@aerogel/core 0.0.0-next.9a02fcd3bcf698211dd7a71d4c48257c96dd7832 → 0.0.0-next.9f9564ab9f8da05f60d7868db361edbc5601ee39

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.
@@ -296,6 +296,12 @@ form: Form<FormFieldDefinitions> | null;
296
296
  }, {}>;
297
297
 
298
298
  export declare const AGHeadlessButton: DefineComponent< {
299
+ as: {
300
+ type?: PropType<Object | null> | undefined;
301
+ validator?(value: unknown): boolean;
302
+ } & {
303
+ default: Object | (() => Object | null) | null;
304
+ };
299
305
  href: {
300
306
  type?: PropType<string | null> | undefined;
301
307
  validator?(value: unknown): boolean;
@@ -335,6 +341,12 @@ default: boolean | (() => boolean) | null;
335
341
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
336
342
  [key: string]: any;
337
343
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
344
+ as: {
345
+ type?: PropType<Object | null> | undefined;
346
+ validator?(value: unknown): boolean;
347
+ } & {
348
+ default: Object | (() => Object | null) | null;
349
+ };
338
350
  href: {
339
351
  type?: PropType<string | null> | undefined;
340
352
  validator?(value: unknown): boolean;
@@ -372,6 +384,7 @@ validator?(value: unknown): boolean;
372
384
  default: boolean | (() => boolean) | null;
373
385
  };
374
386
  }>>, {
387
+ as: Object | null;
375
388
  href: string | null;
376
389
  url: string | null;
377
390
  route: string | null;
@@ -393,17 +406,23 @@ validator?(value: unknown): boolean;
393
406
  } & {
394
407
  default: string | (() => string | null) | null;
395
408
  };
396
- as: {
397
- type?: PropType<string> | undefined;
409
+ description: {
410
+ type?: PropType<string | null> | undefined;
398
411
  validator?(value: unknown): boolean;
399
412
  } & {
400
- default: string | (() => string) | null;
413
+ default: string | (() => string | null) | null;
401
414
  };
402
415
  modelValue: {
403
- type?: PropType<string | number | boolean | null> | undefined;
416
+ type?: PropType<FormFieldValue | null> | undefined;
417
+ validator?(value: unknown): boolean;
418
+ } & {
419
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
420
+ };
421
+ as: {
422
+ type?: PropType<string> | undefined;
404
423
  validator?(value: unknown): boolean;
405
424
  } & {
406
- default: string | number | boolean | (() => string | number | boolean | null) | null;
425
+ default: string | (() => string) | null;
407
426
  };
408
427
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
409
428
  [key: string]: any;
@@ -420,27 +439,38 @@ validator?(value: unknown): boolean;
420
439
  } & {
421
440
  default: string | (() => string | null) | null;
422
441
  };
423
- as: {
424
- type?: PropType<string> | undefined;
442
+ description: {
443
+ type?: PropType<string | null> | undefined;
425
444
  validator?(value: unknown): boolean;
426
445
  } & {
427
- default: string | (() => string) | null;
446
+ default: string | (() => string | null) | null;
428
447
  };
429
448
  modelValue: {
430
- type?: PropType<string | number | boolean | null> | undefined;
449
+ type?: PropType<FormFieldValue | null> | undefined;
431
450
  validator?(value: unknown): boolean;
432
451
  } & {
433
- default: string | number | boolean | (() => string | number | boolean | null) | null;
452
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
453
+ };
454
+ as: {
455
+ type?: PropType<string> | undefined;
456
+ validator?(value: unknown): boolean;
457
+ } & {
458
+ default: string | (() => string) | null;
434
459
  };
435
460
  }>> & {
436
461
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
437
462
  }, {
438
463
  as: string;
439
- modelValue: string | number | boolean | null;
440
464
  name: string | null;
441
465
  label: string | null;
466
+ description: string | null;
467
+ modelValue: FormFieldValue | null;
442
468
  }, {}>;
443
469
 
470
+ export declare const AGHeadlessInputDescription: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
471
+ [key: string]: any;
472
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
473
+
444
474
  export declare const AGHeadlessInputError: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
445
475
  [key: string]: any;
446
476
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
@@ -469,6 +499,10 @@ export declare const AGHeadlessInputLabel: DefineComponent< {}, (_ctx: any, _
469
499
  [key: string]: any;
470
500
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
471
501
 
502
+ export declare const AGHeadlessInputTextArea: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
503
+ [key: string]: any;
504
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
505
+
472
506
  export declare const AGHeadlessModal: DefineComponent< {
473
507
  cancellable: {
474
508
  type?: PropType<boolean> | undefined;
@@ -730,6 +764,18 @@ validator?(value: unknown): boolean;
730
764
  } & {
731
765
  default: string | (() => string | null) | null;
732
766
  };
767
+ description: {
768
+ type?: PropType<string | null> | undefined;
769
+ validator?(value: unknown): boolean;
770
+ } & {
771
+ default: string | (() => string | null) | null;
772
+ };
773
+ modelValue: {
774
+ type?: PropType<FormFieldValue | null> | undefined;
775
+ validator?(value: unknown): boolean;
776
+ } & {
777
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
778
+ };
733
779
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
734
780
  [key: string]: any;
735
781
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -745,9 +791,23 @@ validator?(value: unknown): boolean;
745
791
  } & {
746
792
  default: string | (() => string | null) | null;
747
793
  };
794
+ description: {
795
+ type?: PropType<string | null> | undefined;
796
+ validator?(value: unknown): boolean;
797
+ } & {
798
+ default: string | (() => string | null) | null;
799
+ };
800
+ modelValue: {
801
+ type?: PropType<FormFieldValue | null> | undefined;
802
+ validator?(value: unknown): boolean;
803
+ } & {
804
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
805
+ };
748
806
  }>>, {
749
807
  name: string | null;
750
808
  label: string | null;
809
+ description: string | null;
810
+ modelValue: FormFieldValue | null;
751
811
  }, {}>;
752
812
 
753
813
  export declare const AGLink: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
@@ -796,10 +856,10 @@ validator?(value: unknown): boolean;
796
856
  default: string | (() => string | null) | null;
797
857
  };
798
858
  langParams: {
799
- type?: PropType<Record<string, unknown> | null> | undefined;
859
+ type?: PropType<number | Record<string, unknown> | null> | undefined;
800
860
  validator?(value: unknown): boolean;
801
861
  } & {
802
- default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
862
+ default: number | Record<string, unknown> | (() => number | Record<string, unknown> | null) | null;
803
863
  };
804
864
  text: {
805
865
  type?: PropType<string | null> | undefined;
@@ -829,10 +889,10 @@ validator?(value: unknown): boolean;
829
889
  default: string | (() => string | null) | null;
830
890
  };
831
891
  langParams: {
832
- type?: PropType<Record<string, unknown> | null> | undefined;
892
+ type?: PropType<number | Record<string, unknown> | null> | undefined;
833
893
  validator?(value: unknown): boolean;
834
894
  } & {
835
- default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
895
+ default: number | Record<string, unknown> | (() => number | Record<string, unknown> | null) | null;
836
896
  };
837
897
  text: {
838
898
  type?: PropType<string | null> | undefined;
@@ -844,7 +904,7 @@ default: string | (() => string | null) | null;
844
904
  as: string | null;
845
905
  inline: boolean;
846
906
  langKey: string | null;
847
- langParams: Record<string, unknown> | null;
907
+ langParams: number | Record<string, unknown> | null;
848
908
  text: string | null;
849
909
  }, {}>;
850
910
 
@@ -1215,6 +1275,17 @@ export declare function bootstrap(rootComponent: Component, options?: AerogelOpt
1215
1275
 
1216
1276
  export declare function bootstrapApplication(app: App_2, options?: AerogelOptions): Promise<void>;
1217
1277
 
1278
+ declare const Cache_2: Facade<CacheService, CacheService>;
1279
+ export { Cache_2 as Cache }
1280
+
1281
+ export declare class CacheService extends Service {
1282
+ private cache?;
1283
+ get(url: string): Promise<Response | null>;
1284
+ store(url: string, response: Response): Promise<void>;
1285
+ replace(url: string, response: Response): Promise<void>;
1286
+ protected open(): Promise<Cache>;
1287
+ }
1288
+
1218
1289
  export declare type Color = (typeof Colors)[keyof typeof Colors];
1219
1290
 
1220
1291
  export declare const Colors: {
@@ -1268,6 +1339,8 @@ export declare interface ConfirmOptions {
1268
1339
  cancelText?: string;
1269
1340
  }
1270
1341
 
1342
+ export declare function dateInput(defaultValue?: Date): FormFieldDefinition<typeof FormFieldTypes.Date>;
1343
+
1271
1344
  declare const _default: Constructor<UnrefServiceState< {
1272
1345
  logs: ErrorReportLog[];
1273
1346
  startupErrors: ErrorReport[];
@@ -1343,6 +1416,11 @@ export declare function defineServiceStore<Id extends string, S extends StateTre
1343
1416
 
1344
1417
  export declare function dispatch(job: Job): Promise<void>;
1345
1418
 
1419
+ export declare interface ElementSize {
1420
+ width: number;
1421
+ height: number;
1422
+ }
1423
+
1346
1424
  export declare function enumProp<Enum extends Record<string, unknown>>(enumeration: Enum, defaultValue?: Enum[keyof Enum]): OptionalProp<Enum[keyof Enum]>;
1347
1425
 
1348
1426
  export declare type ErrorHandler = (error: ErrorSource) => boolean;
@@ -1445,23 +1523,32 @@ export declare function extractModalProps<T extends ExtractPropTypes<typeof moda
1445
1523
 
1446
1524
  export declare function extractSelectProps<T extends ExtractPropTypes<typeof selectProps>>(props: T): Pick<T, keyof typeof selectProps>;
1447
1525
 
1448
- declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinitions> extends MagicObject {
1526
+ export declare type FocusFormListener = (input: string) => unknown;
1527
+
1528
+ export declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinitions> extends MagicObject {
1449
1529
  errors: DeepReadonly<UnwrapNestedRefs<FormErrors<Fields>>>;
1450
1530
  private _fields;
1451
1531
  private _data;
1452
1532
  private _submitted;
1453
1533
  private _errors;
1534
+ private _listeners;
1454
1535
  constructor(fields: Fields);
1455
1536
  get valid(): boolean;
1456
1537
  get submitted(): boolean;
1457
1538
  setFieldValue<T extends keyof Fields>(field: T, value: FormData_2<Fields>[T]): void;
1458
1539
  getFieldValue<T extends keyof Fields>(field: T): GetFormFieldValue<Fields[T]['type']>;
1540
+ data(): FormData_2<Fields>;
1459
1541
  validate(): boolean;
1460
1542
  reset(options?: {
1461
1543
  keepData?: boolean;
1462
1544
  keepErrors?: boolean;
1463
1545
  }): void;
1464
1546
  submit(): boolean;
1547
+ on(event: 'focus', listener: FocusFormListener): () => void;
1548
+ on(event: 'submit', listener: SubmitFormListener): () => void;
1549
+ off(event: 'focus', listener: FocusFormListener): void;
1550
+ off(event: 'submit', listener: SubmitFormListener): void;
1551
+ focus(input: string): Promise<void>;
1465
1552
  protected __get(property: string): unknown;
1466
1553
  protected __set(property: string, value: unknown): void;
1467
1554
  private getFieldErrors;
@@ -1495,13 +1582,14 @@ export declare const FormFieldTypes: {
1495
1582
  readonly Number: "number";
1496
1583
  readonly Boolean: "boolean";
1497
1584
  readonly Object: "object";
1585
+ readonly Date: "date";
1498
1586
  };
1499
1587
 
1500
1588
  export declare type FormFieldValue = GetFormFieldValue<FormFieldType>;
1501
1589
 
1502
1590
  export declare function getErrorMessage(error: ErrorSource): string;
1503
1591
 
1504
- export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : TType extends typeof FormFieldTypes.Boolean ? boolean : TType extends typeof FormFieldTypes.Object ? object : never;
1592
+ export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : TType extends typeof FormFieldTypes.Boolean ? boolean : TType extends typeof FormFieldTypes.Object ? object : TType extends typeof FormFieldTypes.Date ? Date : never;
1505
1593
 
1506
1594
  export declare function getPiniaStore(): Pinia;
1507
1595
 
@@ -1517,9 +1605,10 @@ export declare interface IAGHeadlessInput {
1517
1605
  id: string;
1518
1606
  name: ComputedRef<string | null>;
1519
1607
  label: ComputedRef<string | null>;
1520
- value: ComputedRef<string | number | boolean | null>;
1608
+ description: ComputedRef<string | boolean | null>;
1609
+ value: ComputedRef<FormFieldValue | null>;
1521
1610
  errors: DeepReadonly<Ref<string[] | null>>;
1522
- update(value: string | number | boolean | null): void;
1611
+ update(value: FormFieldValue | null): void;
1523
1612
  }
1524
1613
 
1525
1614
  export declare interface IAGHeadlessModal extends IAGModal {
@@ -1579,6 +1668,18 @@ export declare const inputProps: {
1579
1668
  } & {
1580
1669
  default: string | (() => string | null) | null;
1581
1670
  };
1671
+ description: {
1672
+ type?: PropType<string | null> | undefined;
1673
+ validator?(value: unknown): boolean;
1674
+ } & {
1675
+ default: string | (() => string | null) | null;
1676
+ };
1677
+ modelValue: {
1678
+ type?: PropType<FormFieldValue | null> | undefined;
1679
+ validator?(value: unknown): boolean;
1680
+ } & {
1681
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
1682
+ };
1582
1683
  };
1583
1684
 
1584
1685
  export declare function installPlugins(plugins: Plugin_2[], ...args: GetClosureArgs<Plugin_2['install']>): Promise<void>;
@@ -1590,16 +1691,16 @@ export declare abstract class Job {
1590
1691
  export declare const Lang: Facade<LangService, LangService>;
1591
1692
 
1592
1693
  export declare interface LangProvider {
1593
- translate(key: string, parameters?: Record<string, unknown>): string;
1594
- translateWithDefault(key: string, defaultMessage: string, parameters?: Record<string, unknown>): string;
1694
+ translate(key: string, parameters?: Record<string, unknown> | number): string;
1695
+ translateWithDefault(key: string, defaultMessage: string, parameters?: Record<string, unknown> | number): string;
1595
1696
  }
1596
1697
 
1597
1698
  declare class LangService extends Service {
1598
1699
  private provider;
1599
1700
  constructor();
1600
1701
  setProvider(provider: LangProvider): void;
1601
- translate(key: string, parameters?: Record<string, unknown>): string;
1602
- translateWithDefault(key: string, defaultMessage: string, parameters?: Record<string, unknown>): string;
1702
+ translate(key: string, parameters?: Record<string, unknown> | number): string;
1703
+ translateWithDefault(key: string, defaultMessage: string, parameters?: Record<string, unknown> | number): string;
1603
1704
  }
1604
1705
 
1605
1706
  export declare type LangServices = typeof services_2;
@@ -1613,6 +1714,8 @@ export declare const loadingModalProps: {
1613
1714
  };
1614
1715
  };
1615
1716
 
1717
+ export declare type MeasureDirectiveListener = (size: ElementSize) => unknown;
1718
+
1616
1719
  export declare function mixedProp<T>(type?: PropType<T>): OptionalProp<T | null>;
1617
1720
 
1618
1721
  declare interface Modal<T = unknown> {
@@ -1657,6 +1760,10 @@ export declare function objectProp<T>(defaultValue: () => T): OptionalProp<T>;
1657
1760
 
1658
1761
  export declare function onCleanMounted(operation: () => Function): void;
1659
1762
 
1763
+ export declare function onFormFocus(input: {
1764
+ name: string | null;
1765
+ }, listener: () => unknown): void;
1766
+
1660
1767
  declare type OptionalProp<T> = BaseProp<T> & {
1661
1768
  default: T | (() => T) | null;
1662
1769
  };
@@ -1718,6 +1825,7 @@ export declare interface PromptOptions {
1718
1825
  placeholder?: string;
1719
1826
  acceptText?: string;
1720
1827
  cancelText?: string;
1828
+ trim?: boolean;
1721
1829
  }
1722
1830
 
1723
1831
  export declare function removeInteractiveClasses(classes: string): string;
@@ -1726,6 +1834,8 @@ export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
1726
1834
 
1727
1835
  export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
1728
1836
 
1837
+ export declare function requiredDateInput(defaultValue?: Date): FormFieldDefinition<typeof FormFieldTypes.Date>;
1838
+
1729
1839
  export declare function requiredEnumProp<Enum extends Record<string, unknown>>(enumeration: Enum): RequiredProp<Enum[keyof Enum]>;
1730
1840
 
1731
1841
  export declare function requiredMixedProp<T>(type?: PropType<T>): RequiredProp<T>;
@@ -1888,12 +1998,11 @@ export declare function stringProp(): OptionalProp<string | null>;
1888
1998
 
1889
1999
  export declare function stringProp(defaultValue: string): OptionalProp<string>;
1890
2000
 
1891
- export declare const translate: (key: string, parameters?: Record<string, unknown> | undefined) => string;
2001
+ export declare type SubmitFormListener = () => unknown;
1892
2002
 
1893
- export declare const translateWithDefault: {
1894
- (key: string, defaultMessage: string): string;
1895
- (key: string, parameters: Record<string, unknown>, defaultMessage: string): string;
1896
- };
2003
+ export declare const translate: (key: string, parameters?: number | Record<string, unknown> | undefined) => string;
2004
+
2005
+ export declare const translateWithDefault: (key: string, defaultMessage: string, parameters?: number | Record<string, unknown>) => string;
1897
2006
 
1898
2007
  export declare const UI: Facade<UIService, UIService>;
1899
2008