@acorex/cdk 22.0.0 → 22.0.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,15 +6,24 @@ class AXCarouselDirective {
6
6
  constructor() {
7
7
  this.carousel = signal(null, /* @ts-ignore */
8
8
  ...(ngDevMode ? [{ debugName: "carousel" }] : /* istanbul ignore next */ []));
9
- // carouselOptions = input<AXCarouselOptions>();
10
9
  this.el = inject(ElementRef);
11
10
  this.platformId = inject(PLATFORM_ID);
11
+ this.initId = 0;
12
+ }
13
+ destroy() {
14
+ const instance = this.carousel();
15
+ if (!instance)
16
+ return;
17
+ this.carousel.set(null);
18
+ if (instance.destroyed)
19
+ return;
20
+ instance.destroy(true, true);
12
21
  }
13
22
  async init(option) {
14
23
  if (!isPlatformBrowser(this.platformId))
15
24
  return;
16
- if (this.carousel())
17
- this.carousel().destroy;
25
+ const id = ++this.initId;
26
+ this.destroy();
18
27
  const parentElem = this.el.nativeElement;
19
28
  const slides = parentElem.querySelectorAll('.ax-carousel-slide');
20
29
  parentElem.querySelector('.ax-carousel-wrapper')?.classList.add('swiper-wrapper');
@@ -28,7 +37,12 @@ class AXCarouselDirective {
28
37
  item.classList.add('swiper-slide');
29
38
  });
30
39
  const { A11y, Autoplay, Controller, EffectCoverflow, EffectCube, EffectFade, EffectFlip, EffectCreative, EffectCards, HashNavigation, History, Keyboard, Mousewheel, Navigation, Pagination, Parallax, Scrollbar, Thumbs, Virtual, Zoom, FreeMode, Grid, Manipulation, } = await import('swiper/modules');
31
- const res = new (await import('swiper')).Swiper(parentElem, {
40
+ if (id !== this.initId)
41
+ return;
42
+ const SwiperCtor = (await import('swiper')).Swiper;
43
+ if (id !== this.initId)
44
+ return;
45
+ const res = new SwiperCtor(parentElem, {
32
46
  ...option,
33
47
  modules: [
34
48
  A11y,
@@ -56,6 +70,10 @@ class AXCarouselDirective {
56
70
  Manipulation,
57
71
  ],
58
72
  });
73
+ if (id !== this.initId) {
74
+ res.destroy(true, true);
75
+ return;
76
+ }
59
77
  this.carousel.set(res);
60
78
  }
61
79
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXCarouselDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-cdk-carousel.mjs","sources":["../../../../packages/cdk/carousel/src/carousel.directive.ts","../../../../packages/cdk/carousel/src/acorex-cdk-carousel.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, inject, PLATFORM_ID, signal } from '@angular/core';\nimport type { Swiper, SwiperOptions } from 'swiper/types';\n\nexport type AXCarousel = Swiper;\nexport type AXCarouselOptions = SwiperOptions;\n\n@Directive({\n selector: '[axCarousel]',\n exportAs: 'axCarousel',\n})\nexport class AXCarouselDirective {\n carousel = signal<AXCarousel>(null);\n // carouselOptions = input<AXCarouselOptions>();\n private el = inject(ElementRef);\n private platformId = inject(PLATFORM_ID);\n\n async init(option: AXCarouselOptions) {\n if (!isPlatformBrowser(this.platformId)) return;\n if (this.carousel()) this.carousel().destroy;\n const parentElem = this.el.nativeElement as HTMLElement;\n const slides = parentElem.querySelectorAll('.ax-carousel-slide');\n\n parentElem.querySelector('.ax-carousel-wrapper')?.classList.add('swiper-wrapper');\n parentElem.querySelector('.ax-carousel-pagination')?.classList.add('swiper-pagination');\n parentElem.querySelector('.ax-carousel-scrollbar')?.classList.add('swiper-scrollbar');\n parentElem.querySelector('.ax-carousel-button-prev')?.classList.add('swiper-button-prev');\n parentElem.querySelector('.ax-carousel-button-next')?.classList.add('swiper-button-next');\n\n slides?.forEach((item) => {\n if (item.classList.contains('swiper-slide')) return;\n item.classList.add('swiper-slide');\n });\n\n const {\n A11y,\n Autoplay,\n Controller,\n EffectCoverflow,\n EffectCube,\n EffectFade,\n EffectFlip,\n EffectCreative,\n EffectCards,\n HashNavigation,\n History,\n Keyboard,\n Mousewheel,\n Navigation,\n Pagination,\n Parallax,\n Scrollbar,\n Thumbs,\n Virtual,\n Zoom,\n FreeMode,\n Grid,\n Manipulation,\n } = await import('swiper/modules');\n\n const res = new (await import('swiper')).Swiper(parentElem, {\n ...option,\n modules: [\n A11y,\n Autoplay,\n Controller,\n EffectCoverflow,\n EffectCube,\n EffectFade,\n EffectFlip,\n EffectCreative,\n EffectCards,\n HashNavigation,\n History,\n Keyboard,\n Mousewheel,\n Navigation,\n Pagination,\n Parallax,\n Scrollbar,\n Thumbs,\n Virtual,\n Zoom,\n FreeMode,\n Grid,\n Manipulation,\n ],\n });\n\n this.carousel.set(res);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAWa,mBAAmB,CAAA;AAJhC,IAAA,WAAA,GAAA;QAKE,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAa,IAAI;qFAAC;;AAE3B,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AACvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AA4EzC,IAAA;IA1EC,MAAM,IAAI,CAAC,MAAyB,EAAA;AAClC,QAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC;YAAE;QACzC,IAAI,IAAI,CAAC,QAAQ,EAAE;AAAE,YAAA,IAAI,CAAC,QAAQ,EAAE,CAAC,OAAO;AAC5C,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,aAA4B;QACvD,MAAM,MAAM,GAAG,UAAU,CAAC,gBAAgB,CAAC,oBAAoB,CAAC;AAEhE,QAAA,UAAU,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACjF,QAAA,UAAU,CAAC,aAAa,CAAC,yBAAyB,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC;AACvF,QAAA,UAA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A;AACF,SAAA,CAAC;AAEF,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;IACxB;8GA/EW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;AACvB,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-cdk-carousel.mjs","sources":["../../../../packages/cdk/carousel/src/carousel.directive.ts","../../../../packages/cdk/carousel/src/acorex-cdk-carousel.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, inject, PLATFORM_ID, signal } from '@angular/core';\nimport type { Swiper, SwiperOptions } from 'swiper/types';\n\nexport type AXCarousel = Swiper;\nexport type AXCarouselOptions = SwiperOptions;\n\n@Directive({\n selector: '[axCarousel]',\n exportAs: 'axCarousel',\n})\nexport class AXCarouselDirective {\n carousel = signal<AXCarousel>(null);\n private el = inject(ElementRef);\n private platformId = inject(PLATFORM_ID);\n private initId = 0;\n\n destroy(): void {\n const instance = this.carousel();\n if (!instance) return;\n this.carousel.set(null);\n if (instance.destroyed) return;\n instance.destroy(true, true);\n }\n\n async init(option: AXCarouselOptions) {\n if (!isPlatformBrowser(this.platformId)) return;\n const id = ++this.initId;\n this.destroy();\n const parentElem = this.el.nativeElement as HTMLElement;\n const slides = parentElem.querySelectorAll('.ax-carousel-slide');\n\n parentElem.querySelector('.ax-carousel-wrapper')?.classList.add('swiper-wrapper');\n parentElem.querySelector('.ax-carousel-pagination')?.classList.add('swiper-pagination');\n parentElem.querySelector('.ax-carousel-scrollbar')?.classList.add('swiper-scrollbar');\n parentElem.querySelector('.ax-carousel-button-prev')?.classList.add('swiper-button-prev');\n parentElem.querySelector('.ax-carousel-button-next')?.classList.add('swiper-button-next');\n\n slides?.forEach((item) => {\n if (item.classList.contains('swiper-slide')) return;\n item.classList.add('swiper-slide');\n });\n\n const {\n A11y,\n Autoplay,\n Controller,\n EffectCoverflow,\n EffectCube,\n EffectFade,\n EffectFlip,\n EffectCreative,\n EffectCards,\n HashNavigation,\n History,\n Keyboard,\n Mousewheel,\n Navigation,\n Pagination,\n Parallax,\n Scrollbar,\n Thumbs,\n Virtual,\n Zoom,\n FreeMode,\n Grid,\n Manipulation,\n } = await import('swiper/modules');\n\n if (id !== this.initId) return;\n\n const SwiperCtor = (await import('swiper')).Swiper;\n if (id !== this.initId) return;\n\n const res = new SwiperCtor(parentElem, {\n ...option,\n modules: [\n A11y,\n Autoplay,\n Controller,\n EffectCoverflow,\n EffectCube,\n EffectFade,\n EffectFlip,\n EffectCreative,\n EffectCards,\n HashNavigation,\n History,\n Keyboard,\n Mousewheel,\n Navigation,\n Pagination,\n Parallax,\n Scrollbar,\n Thumbs,\n Virtual,\n Zoom,\n FreeMode,\n Grid,\n Manipulation,\n ],\n });\n\n if (id !== this.initId) {\n res.destroy(true, true);\n return;\n }\n\n this.carousel.set(res);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAWa,mBAAmB,CAAA;AAJhC,IAAA,WAAA,GAAA;QAKE,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAa,IAAI;qFAAC;AAC3B,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AACvB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAChC,IAAA,CAAA,MAAM,GAAG,CAAC;AA+FnB,IAA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A,SAAA,EAAA,CAAA,CAAA;kGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;AACvB,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -2114,9 +2114,17 @@ class MXSelectionValueComponent extends MXValueComponent {
2114
2114
  const valueKey = isComplexObject ? get(itemRecord, this.valueField) : item;
2115
2115
  const key = valueKey != null ? String(valueKey) : String(item);
2116
2116
  const cacheKey = this.createCacheKey(key);
2117
- // Return cached item if available and has text
2118
2117
  const cachedItem = this.dataService.cacheList[cacheKey];
2119
2118
  if (cachedItem && get(cachedItem, this.textField) != null) {
2119
+ if (isComplexObject) {
2120
+ const incomingText = get(itemRecord, this.textField);
2121
+ if (incomingText != null &&
2122
+ incomingText !== get(cachedItem, this.textField) &&
2123
+ incomingText !== '@acorex:common.status.loading') {
2124
+ Object.assign(cachedItem, itemRecord);
2125
+ delete cachedItem['_lastDisplayTextResult'];
2126
+ }
2127
+ }
2120
2128
  return cachedItem;
2121
2129
  }
2122
2130
  const hasTextProperty = !isComplexObject || get(itemRecord, this.textField) != null;
@@ -2314,6 +2322,20 @@ class MXSelectionValueComponent extends MXValueComponent {
2314
2322
  if (item && typeof item === 'object' && item['_displayTextLoading']) {
2315
2323
  return '@acorex:common.status.loading';
2316
2324
  }
2325
+ if (item && typeof item === 'object') {
2326
+ const incomingText = get(item, this.textField);
2327
+ if (incomingText != null && incomingText !== '' && incomingText !== '@acorex:common.status.loading') {
2328
+ const itemKey = get(item, this.valueField);
2329
+ if (itemKey != null) {
2330
+ const cachedItem = this.dataService.cacheList[this.createCacheKey(String(itemKey))];
2331
+ if (cachedItem && cachedItem[this.textField] !== incomingText) {
2332
+ cachedItem[this.textField] = incomingText;
2333
+ delete cachedItem['_lastDisplayTextResult'];
2334
+ }
2335
+ }
2336
+ return String(incomingText);
2337
+ }
2338
+ }
2317
2339
  // Add timestamp-based debouncing to prevent excessive calls for ALL item types
2318
2340
  const now = Date.now();
2319
2341
  const itemKey = typeof item === 'string' ? item : get(item, this.valueField);
@@ -2683,9 +2705,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2683
2705
  type: Input
2684
2706
  }] } });
2685
2707
 
2708
+ /**
2709
+ * Scrolls `element` into view inside `container` using nearest-edge behavior.
2710
+ * Only adjusts the container's own scrollTop — never the document — so overlay
2711
+ * dismissal on document scroll is not triggered.
2712
+ */
2713
+ function scrollNearestIntoView(container, element, topInset = 0) {
2714
+ const containerRect = container.getBoundingClientRect();
2715
+ const elementRect = element.getBoundingClientRect();
2716
+ const top = elementRect.top - containerRect.top - topInset;
2717
+ const bottom = elementRect.bottom - containerRect.bottom;
2718
+ if (top < 0) {
2719
+ container.scrollTop += top;
2720
+ }
2721
+ else if (bottom > 0) {
2722
+ container.scrollTop += bottom;
2723
+ }
2724
+ }
2725
+ /**
2726
+ * Scrolls an option into view inside a scrollable container using nearest-edge behavior.
2727
+ * Uses bounding rects relative to the container so it works even when offsetParent differs.
2728
+ */
2729
+ function scrollOptionWithinContainer(container, option) {
2730
+ const containerRect = container.getBoundingClientRect();
2731
+ const optionRect = option.getBoundingClientRect();
2732
+ const relativeTop = optionRect.top - containerRect.top + container.scrollTop;
2733
+ const relativeBottom = relativeTop + option.offsetHeight;
2734
+ const viewTop = container.scrollTop;
2735
+ const viewBottom = viewTop + container.clientHeight;
2736
+ const maxScroll = Math.max(0, container.scrollHeight - container.clientHeight);
2737
+ if (relativeTop < viewTop) {
2738
+ container.scrollTop = relativeTop;
2739
+ }
2740
+ else if (relativeBottom > viewBottom) {
2741
+ container.scrollTop = Math.min(relativeBottom - container.clientHeight, maxScroll);
2742
+ }
2743
+ }
2744
+ /**
2745
+ * Retries `fn` on successive animation frames until it returns true or `attempts` is exhausted.
2746
+ * Used when the target element appears only after an overlay has been positioned and laid out.
2747
+ */
2748
+ function retryFrames(fn, attempts = 5) {
2749
+ if (typeof requestAnimationFrame === 'undefined') {
2750
+ return;
2751
+ }
2752
+ let remaining = attempts;
2753
+ const tick = () => {
2754
+ if (fn() || --remaining <= 0) {
2755
+ return;
2756
+ }
2757
+ requestAnimationFrame(tick);
2758
+ };
2759
+ requestAnimationFrame(tick);
2760
+ }
2761
+
2686
2762
  /**
2687
2763
  * Generated bundle index. Do not edit.
2688
2764
  */
2689
2765
 
2690
- export { AXAutoFocusDirective, AXAutocompleteParentComponent, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosableComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXItemSelectedEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, NXButtonComponent, NXClickEvent, NXColorComponent, NXComponent, NXEvent, NXInteractiveComponent, NXLookComponent, NXNativeEvent, NXValueComponent, TAB_META_KEY, applyDataSourceQuery, convertArrayToDataSource, convertToPlacement };
2766
+ export { AXAutoFocusDirective, AXAutocompleteParentComponent, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosableComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXItemSelectedEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, NXButtonComponent, NXClickEvent, NXColorComponent, NXComponent, NXEvent, NXInteractiveComponent, NXLookComponent, NXNativeEvent, NXValueComponent, TAB_META_KEY, applyDataSourceQuery, convertArrayToDataSource, convertToPlacement, retryFrames, scrollNearestIntoView, scrollOptionWithinContainer };
2691
2767
  //# sourceMappingURL=acorex-cdk-common.mjs.map