bt-core-app 2.1.17 → 2.1.18

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
@@ -79,9 +79,11 @@ export declare interface AFormField {
79
79
  isRequired?: boolean;
80
80
  isSubmitButton?: boolean;
81
81
  label?: string;
82
+ mapToProp?: string;
82
83
  options?: string[];
83
84
  placeholder?: string;
84
85
  prop?: string;
86
+ remember?: boolean;
85
87
  type: FieldType;
86
88
  url?: string;
87
89
  }
@@ -93,6 +95,11 @@ export declare interface AFormFieldMeta {
93
95
  type: FieldType;
94
96
  }
95
97
 
98
+ export declare interface AFormRequirements {
99
+ group: string;
100
+ props: string[];
101
+ }
102
+
96
103
  export declare interface AFormSlide {
97
104
  fields: AFormField[];
98
105
  canDelete?: boolean;
@@ -100,6 +107,13 @@ export declare interface AFormSlide {
100
107
  name: string;
101
108
  }
102
109
 
110
+ export declare interface AFormTemplate {
111
+ description?: string;
112
+ form: AForm;
113
+ group?: string;
114
+ templateName: string;
115
+ }
116
+
103
117
  export declare type AFormVariant = 'basic' | 'half-and-half' | 'single-page';
104
118
 
105
119
  export declare interface ApiActionOptions extends StorePathOptions, DoActionOptions {
@@ -659,6 +673,7 @@ export declare interface CreateCoreOptions {
659
673
  demo?: CreateDemoOptions;
660
674
  feedback?: CreateFeedbackOptions;
661
675
  filters?: any;
676
+ forms?: CreateFormsOptions;
662
677
  heights?: CreateHeightOptions;
663
678
  includeComponents?: boolean;
664
679
  menu?: CreateMenuOptions;
@@ -706,6 +721,13 @@ export declare interface CreateFeedbackOptions {
706
721
 
707
722
  export declare function createFilters(options: UseFiltersOptions): BTFilters;
708
723
 
724
+ export declare function createForms(options?: CreateFormsOptions): CreateFormsOptions;
725
+
726
+ export declare interface CreateFormsOptions {
727
+ requirementSets: AFormRequirements[];
728
+ templates: AFormTemplate[];
729
+ }
730
+
709
731
  export declare function createGraphs(opt: CreateGraphsOptions): BTGraphs;
710
732
 
711
733
  export declare interface CreateGraphsOptions {
@@ -2363,6 +2385,7 @@ export declare interface UseFiltersOptions {
2363
2385
  export declare function useForms(options?: UseFormsOptions): {
2364
2386
  addFieldToSlide: (field: AFormFieldMeta, slide: AFormSlide) => void;
2365
2387
  addSlide: () => void;
2388
+ applyTemplate: (template: AFormTemplate) => void;
2366
2389
  clearCurrent: () => void;
2367
2390
  currentField: Ref<AFormField | undefined, AFormField | undefined>;
2368
2391
  currentSlide: Ref<AFormSlide | undefined, AFormSlide | undefined>;
@@ -2382,6 +2405,7 @@ export declare function useForms(options?: UseFormsOptions): {
2382
2405
  moveSlideUp: (slideIndex: number) => void;
2383
2406
  removeCurrent: () => void;
2384
2407
  removeSlide: (slideName?: string) => void;
2408
+ resetData: (data: any, remember: boolean) => any;
2385
2409
  schema: Ref<AForm | undefined, AForm | undefined>;
2386
2410
  schemaString: ComputedRef<string>;
2387
2411
  selectField: (slide: AFormSlide, field: AFormField) => void;
@@ -2390,9 +2414,14 @@ export declare function useForms(options?: UseFormsOptions): {
2390
2414
 
2391
2415
  export declare interface UseFormsOptions {
2392
2416
  defaultColor?: string;
2417
+ defaultTemplateName?: string;
2393
2418
  onGetSchema?: (schema: AForm) => AForm;
2394
2419
  }
2395
2420
 
2421
+ export declare function useFormSource(): CreateFormsOptions;
2422
+
2423
+ export declare function useFormTemplates(group?: string): AFormTemplate[];
2424
+
2396
2425
  export declare function useGeo(): {
2397
2426
  areaContains: (polygon: GeoCoordinate[], point?: GeoCoordinate) => boolean;
2398
2427
  getAreaAround: (location: GeoCoordinate, radius: number) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
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": {