forms-angular 0.12.0-beta.263 → 0.12.0-beta.264

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.
@@ -2,7 +2,6 @@ declare module fng {
2
2
  export interface IFng extends angular.IModule {
3
3
  beforeProcess?: (scope: IFormScope, cb: (err?: Error) => void) => void;
4
4
  beforeHandleIncomingDataPromises?: () => angular.IPromise<any>[];
5
- pseudo?: (token: string, upperFirst: boolean) => string;
6
5
  title?: { prefix?: string; suffix?: string };
7
6
  // when provided, the named function (assumed to be present on $rootscope) will be used to determine the visibility
8
7
  // of menu items and control groups
@@ -308,7 +307,7 @@ declare module fng {
308
307
  anything else will be used as a paragraph stype
309
308
  */
310
309
  titleTagOrClass?: string;
311
- content: IFormSchemaElement[];
310
+ content: IFormInstruction[];
312
311
  }
313
312
 
314
313
  export type IFormSchemaElement = IFormInstruction | IContainer;
@@ -653,8 +652,7 @@ declare module fng {
653
652
  interface IPluginHelperService {
654
653
  extractFromAttr: (
655
654
  attr: any,
656
- directiveName: string,
657
- scope: fng.IFormScope
655
+ directiveName: string
658
656
  ) => { info: IFormInstruction; options: IFormOptions; directiveOptions: any };
659
657
  buildInputMarkup: (
660
658
  scope: angular.IScope,
@@ -692,7 +690,7 @@ declare module fng {
692
690
  processedAttrs: IProcessedAttrs,
693
691
  idSuffix: string
694
692
  ) => string;
695
- handlePseudos: (scope: fng.IFormScope, str: string) => string;
693
+ handlePseudos: (str: string) => string;
696
694
  genDisableableAncestorStr: (processedAttrs: IProcessedAttrs) => string;
697
695
  }
698
696
 
@@ -823,8 +821,7 @@ declare module fng {
823
821
  handleReadOnlyDisabled: (partialFieldInfo: { name: string, id?: string, nonUniqueId?: string, readonly?: boolean | string }, scope: fng.IFormScope) => string[];
824
822
  generateArrayElementIdString: (idString: string, info: fng.IFormInstruction, options: fng.IFormOptions) => string;
825
823
  genDisableableAncestorStr: (id: string) => string;
826
- generateNgShow: (showWhen: IFngShowWhen, model: string) => string;
827
- handlePseudos: (scope: fng.IFormScope, str: string, dynamicFuncName?: string) => string;
824
+ generateNgShow(showWhen: IFngShowWhen, model: string): string;
828
825
  }
829
826
  }
830
827
 
@@ -734,7 +734,7 @@ class FormsAngular {
734
734
  }, {});
735
735
  }
736
736
  let outPath = {}, hiddenFields = [], listFields = [];
737
- if (resource && resource.preprocessed && resource.preprocessed[formName || "__default"]) {
737
+ if (resource && !resource.options?.doNotCacheSchema && resource.preprocessed && resource.preprocessed[formName || "__default"]) {
738
738
  return resource.preprocessed[formName || "__default"].paths;
739
739
  }
740
740
  else {
@@ -798,7 +798,7 @@ class FormsAngular {
798
798
  if (listFields.length > 0) {
799
799
  returnObj.listFields = listFields;
800
800
  }
801
- if (resource) {
801
+ if (resource && !resource.options?.doNotCacheSchema) {
802
802
  resource.preprocessed = resource.preprocessed || {};
803
803
  resource.preprocessed[formName || "__default"] = returnObj;
804
804
  }
@@ -57,6 +57,7 @@ declare module fngServer {
57
57
  idIsList?: IIdIsList,
58
58
  searchResultFormat?: ISearchResultFormatter,
59
59
  searchOrder?: any,
60
+ doNotCacheSchema?: boolean, // useful if bespoke fields can be added at runtime, for instance
60
61
  listOrder?: any,
61
62
  onAccess?: (req, cb) => void,
62
63
  searchFunc?: SearchFunc;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Mark Chapman <support@forms-angular.org>",
4
4
  "description": "A form builder that sits on top of Angular.js, Twitter Bootstrap, jQuery UI, Angular-UI, Express and Mongoose. Opinionated or what?",
5
5
  "homepage": "http://forms-angular.org",
6
- "version": "0.12.0-beta.263",
6
+ "version": "0.12.0-beta.264",
7
7
  "engines": {
8
8
  "node": ">=8.x",
9
9
  "npm": ">=5.x"