@sapphire-ion/framework 1.0.32 → 1.0.34

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.
@@ -1,6 +1,6 @@
1
1
  import { AfterViewInit, ElementRef, InputSignal, ModelSignal, Signal, TemplateRef, WritableSignal } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
- import { IonModal } from '@ionic/angular';
3
+ import { InfiniteScrollCustomEvent, IonContent, IonModal } from '@ionic/angular';
4
4
  import { InputSelectConfiguration } from './input.select.configuration';
5
5
  import { SIonPopoverComponent } from '../../popover/sion-popover/sion-popover.component';
6
6
  import { CustomInput } from '../custom-input';
@@ -19,6 +19,8 @@ export declare class InputSelectComponent<T = any> extends CustomInput<T | T[]>
19
19
  SetCurrentItemLabel(): void;
20
20
  lstOptionsItemValue: Signal<ItemValue<any>[]>;
21
21
  lstOptions: ItemValue<any>[];
22
+ infiniteScrollPage: WritableSignal<number>;
23
+ AddPage(event: InfiniteScrollCustomEvent): void;
22
24
  UpdateLstOptions(search: string): void;
23
25
  UpdateSelected(): void;
24
26
  labelTemplate: TemplateRef<LabelTemplateContext<T>>;
@@ -50,6 +52,7 @@ export declare class InputSelectComponent<T = any> extends CustomInput<T | T[]>
50
52
  popover: SIonPopoverComponent;
51
53
  modal: IonModal;
52
54
  floatingVisible: boolean;
55
+ ionContent: IonContent;
53
56
  Present(event: Event): Promise<void>;
54
57
  Dismiss(): Promise<void>;
55
58
  OnDismiss(): void;
@@ -28,6 +28,24 @@ export declare class InputSelectConfiguration {
28
28
  multiple: boolean;
29
29
  /** Desativa os items que estão de acordo com a função */
30
30
  disableConditional: ((obj: any) => boolean) | null;
31
+ static Create(options: {
32
+ bindLabel: string | ((obj: any) => string);
33
+ bindValue: string | ((obj: any) => any);
34
+ clearable?: boolean;
35
+ searcheable?: boolean;
36
+ loadFrom?: HttpService | Observable<ViewRetorno> | any[];
37
+ multiple?: boolean;
38
+ vFiltros?: Partial<{
39
+ search: string;
40
+ orderByProperty: string;
41
+ ascending: boolean;
42
+ filter: Comparison[];
43
+ }>;
44
+ disableConditional?: ((obj: any) => boolean);
45
+ useInfiniteScroll?: boolean;
46
+ placeholder?: string;
47
+ noItensFoundText?: string;
48
+ }): InputSelectConfiguration;
31
49
  placeholder: string;
32
50
  noItensFoundText: string;
33
51
  loader: InputSelectDataLoader;
@@ -39,6 +57,7 @@ export declare class InputSelectConfiguration {
39
57
  placement: Placement;
40
58
  };
41
59
  vFiltros: ViewFiltros | null;
60
+ useInfiniteScroll: boolean;
42
61
  constructor(
43
62
  /** Valor que será setado no formControl */
44
63
  bindValue?: string | ((obj: any) => any),
@@ -1,8 +1,8 @@
1
- import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, TemplateRef, ViewContainerRef } from '@angular/core';
1
+ import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, TemplateRef, ViewContainerRef, ViewRef } from '@angular/core';
2
2
  import { ComputePositionReturn, Placement } from '@floating-ui/dom';
3
3
  import * as i0 from "@angular/core";
4
4
  type Fill = 'solid' | 'outline' | 'blur' | 'clear';
5
- export declare class SIonPopoverComponent implements OnDestroy, OnInit {
5
+ export declare class SIonPopoverComponent implements OnInit, OnDestroy {
6
6
  private viewContainerRef;
7
7
  private ngZone;
8
8
  fill: Fill;
@@ -20,21 +20,29 @@ export declare class SIonPopoverComponent implements OnDestroy, OnInit {
20
20
  popoverTemplate: TemplateRef<any>;
21
21
  contentContainer: ElementRef<HTMLDivElement>;
22
22
  arrowElement: ElementRef<HTMLElement>;
23
- contentChildren: QueryList<any>;
24
- isVisible: boolean;
23
+ ngOnInit(): void;
24
+ documentClickListener: (event: MouseEvent) => void;
25
+ viewRef?: ViewRef;
26
+ private _embeddedView?;
27
+ CreateEmbeddedView(): void;
28
+ private _instance?;
29
+ CreateInstance(): void;
30
+ get arrowEl(): HTMLElement | undefined;
25
31
  private cleanupAutoUpdate?;
26
- private popoverInstance?;
27
- isVisibleChange: EventEmitter<boolean>;
28
- private lock;
32
+ state: POPOVER_STATE;
29
33
  present(event?: Event): Promise<void>;
30
- GetComputePositionReturn(refEl: HTMLElement, popEl: HTMLElement, arrowEl: HTMLElement): Promise<ComputePositionReturn>;
31
- private CreatePopoverInBody;
32
- onClick(event: MouseEvent): void;
33
- documentClickListener: (event: MouseEvent) => void;
34
- ngOnInit(): void;
34
+ private update;
35
35
  dismiss(): Promise<void>;
36
+ HandleComputePositionReturn(computePositionReturn: ComputePositionReturn, arrowEl: HTMLElement): void;
36
37
  ngOnDestroy(): void;
38
+ GetComputePositionReturn(refEl: HTMLElement, popEl: HTMLElement, arrowEl: HTMLElement): Promise<ComputePositionReturn>;
37
39
  static ɵfac: i0.ɵɵFactoryDeclaration<SIonPopoverComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<SIonPopoverComponent, "sion-popover", never, { "fill": { "alias": "fill"; "required": false; }; "arrow": { "alias": "arrow"; "required": false; }; "flip": { "alias": "flip"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "anchor": { "alias": "anchor"; "required": false; }; }, { "onWillPresent": "onWillPresent"; "onDidPresent": "onDidPresent"; "onWillDismiss": "onWillDismiss"; "onDidDismiss": "onDidDismiss"; "isVisibleChange": "isVisibleChange"; }, ["contentChildren"], ["*"], false, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<SIonPopoverComponent, "sion-popover", never, { "fill": { "alias": "fill"; "required": false; }; "arrow": { "alias": "arrow"; "required": false; }; "flip": { "alias": "flip"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "anchor": { "alias": "anchor"; "required": false; }; }, { "onWillPresent": "onWillPresent"; "onDidPresent": "onDidPresent"; "onWillDismiss": "onWillDismiss"; "onDidDismiss": "onDidDismiss"; }, never, ["*"], false, never>;
41
+ }
42
+ declare enum POPOVER_STATE {
43
+ IDLE = 1,
44
+ PRESENTING = 2,
45
+ DISMISSING = 3,
46
+ VISIBLE = 4
39
47
  }
40
48
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire-ion/framework",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.2.8",
@@ -3,8 +3,14 @@
3
3
  width: max-content;
4
4
  position: absolute;
5
5
  will-change: left, top, bottom, right, auto, opacity, filter;
6
- transition: opacity, transform, filter 0.2s ease-in-out;
7
- display: none;
6
+ opacity: 0;
7
+ transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out, filter 0.15s ease-in-out;
8
+ // display: none;
9
+ min-width: 2rem;
10
+ min-height: 2rem;
11
+
12
+ filter: grayscale(0.9);
13
+ transform: scale(0.95);
8
14
  }
9
15
  .popover-arrow{
10
16
  @apply rounded-sm;
@@ -12,35 +18,11 @@
12
18
  transform: scale(1) rotate(var(--rotation)) !important;
13
19
  clip-path: var(--clip-path-triangle, polygon(0% 0%,0% 100%,100% 100%));
14
20
  }
15
- .visible-anim {
16
- animation: visible 0.2s ease-in-out forwards;
21
+ .show {
22
+ filter: grayscale(0);
23
+ transform: scale(1);
24
+ opacity: 1;
17
25
  }
18
- .invisible-anim {
26
+ .popover-wrapper:not(.show) {
19
27
  pointer-events: none;
20
- animation: invisible 0.2s ease-in-out forwards;
21
- opacity: 0;
22
- }
23
- @keyframes visible {
24
- from {
25
- opacity: 0 !important;
26
- filter: grayscale(0.9);
27
- transform: scale(0.95);
28
- }
29
- to {
30
- opacity: 1 !important;
31
- filter: grayscale(0);
32
- transform: scale(1);
33
- }
34
- }
35
- @keyframes invisible {
36
- from {
37
- opacity: 1;
38
- filter: grayscale(0);
39
- transform: scale(1);
40
- }
41
- to {
42
- opacity: 0 !important;
43
- filter: grayscale(0.9);
44
- transform: scale(0.95);
45
- }
46
- }
28
+ }