bt-core-app 2.1.22 → 2.1.24

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.
package/dist/index.d.ts CHANGED
@@ -77,7 +77,11 @@ declare interface AFormBase {
77
77
  version?: number;
78
78
  }
79
79
 
80
- export declare interface AFormField {
80
+ export declare interface AFormField extends AFormFieldBase {
81
+ type: FieldType;
82
+ }
83
+
84
+ declare interface AFormFieldBase {
81
85
  description?: string;
82
86
  isRequired?: boolean;
83
87
  isSubmitButton?: boolean;
@@ -87,7 +91,6 @@ export declare interface AFormField {
87
91
  placeholder?: string;
88
92
  prop?: string;
89
93
  remember?: boolean;
90
- type: FieldType;
91
94
  url?: string;
92
95
  }
93
96
 
@@ -105,12 +108,12 @@ export declare interface AFormRequirements {
105
108
 
106
109
  export declare interface AFormSlide extends AFormSlideBase {
107
110
  fields: AFormField[];
111
+ name: string;
108
112
  }
109
113
 
110
114
  declare interface AFormSlideBase {
111
115
  canDelete?: boolean;
112
116
  canEdit?: boolean;
113
- name: string;
114
117
  }
115
118
 
116
119
  export declare interface AFormTemplate {
@@ -591,27 +594,16 @@ export declare interface CosmeticData {
591
594
  theme?: string;
592
595
  }
593
596
 
594
- export declare function createAField(fieldType: FieldType, furtherProps?: AFormField): {
595
- description?: string | undefined;
596
- isRequired?: boolean | undefined;
597
- isSubmitButton?: boolean | undefined;
598
- label?: string | undefined;
599
- mapToProp?: string | undefined;
600
- options?: string[] | undefined;
601
- placeholder?: string | undefined;
602
- prop?: string | undefined;
603
- remember?: boolean | undefined;
604
- type?: FieldType | undefined;
605
- url?: string | undefined;
606
- icon?: string | undefined;
607
- };
597
+ declare interface CreateAForm {
598
+ form: AForm;
599
+ addSlide: (slideName: string, furtherProps?: AFormSlideBase) => CreateAForm;
600
+ addField: (t: FieldType, furtherProps?: AFormFieldBase) => CreateAForm;
601
+ }
608
602
 
609
- export declare function createAForm(slides: AFormSlide[], furtherProps?: AFormBase): AForm;
603
+ export declare function createAForm(furtherProps?: AFormBase): CreateAForm;
610
604
 
611
605
  export declare function createApi(options?: UseApiOptions): BTApi;
612
606
 
613
- export declare function createASlide(fields: AFormField[], furtherProps: AFormSlideBase): AFormSlide;
614
-
615
607
  export declare function createAssistant(options?: CreateAssistantOptions): BTAssistant;
616
608
 
617
609
  export declare interface CreateAssistantOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {