UNPKG

3.28 kBSource Map (JSON)View Raw
1{"version":3,"file":"ReflectionGroup.js","sourceRoot":"","sources":["../../../src/lib/models/ReflectionGroup.ts"],"names":[],"mappings":";;AAUA,MAAa,eAAe;IAkExB,YAAY,KAAa,EAAE,IAAoB;QApD/C,aAAQ,GAAiB,EAAE,CAAC;QAqDxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,IAAI,CAAC,0BAA0B,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,6BAA6B,EAAE,CAAC,CAAC;IACnF,CAAC;IAKO,6BAA6B;QACjC,IAAI,gBAAgB,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YAC5B,gBAAgB,GAAG,gBAAgB,IAAI,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;QAClE,CAAC,CAAC,CAAC;QAEH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;CACJ;AApFD,0CAoFC","sourcesContent":["import { Reflection, ReflectionKind } from './reflections/abstract';\nimport { ReflectionCategory } from './ReflectionCategory';\n\n/**\n * A group of reflections. All reflections in a group are of the same kind.\n *\n * Reflection groups are created by the ´GroupHandler´ in the resolving phase\n * of the dispatcher. The main purpose of groups is to be able to more easily\n * render human readable children lists in templates.\n */\nexport class ReflectionGroup {\n /**\n * The title, a string representation of the typescript kind, of this group.\n */\n title: string;\n\n /**\n * The original typescript kind of the children of this group.\n */\n kind: ReflectionKind;\n\n /**\n * All reflections of this group.\n */\n children: Reflection[] = [];\n\n /**\n * A list of generated css classes that should be applied to representations of this\n * group in the generated markup.\n */\n cssClasses?: string;\n\n /**\n * Do all children of this group have a separate document?\n *\n * A bound representation of the ´ReflectionGroup.getAllChildrenHaveOwnDocument´\n * that can be used within templates.\n */\n allChildrenHaveOwnDocument: Function;\n\n /**\n * Are all children inherited members?\n */\n allChildrenAreInherited?: boolean;\n\n /**\n * Are all children private members?\n */\n allChildrenArePrivate?: boolean;\n\n /**\n * Are all children private or protected members?\n */\n allChildrenAreProtectedOrPrivate?: boolean;\n\n /**\n * Are all children external members?\n */\n allChildrenAreExternal?: boolean;\n\n /**\n * Are any children exported declarations?\n */\n someChildrenAreExported?: boolean;\n\n /**\n * Categories contained within this group.\n */\n categories?: ReflectionCategory[];\n\n /**\n * Create a new ReflectionGroup instance.\n *\n * @param title The title of this group.\n * @param kind The original typescript kind of the children of this group.\n */\n constructor(title: string, kind: ReflectionKind) {\n this.title = title;\n this.kind = kind;\n\n this.allChildrenHaveOwnDocument = (() => this.getAllChildrenHaveOwnDocument());\n }\n\n /**\n * Do all children of this group have a separate document?\n */\n private getAllChildrenHaveOwnDocument(): boolean {\n let onlyOwnDocuments = true;\n this.children.forEach((child) => {\n onlyOwnDocuments = onlyOwnDocuments && !!child.hasOwnDocument;\n });\n\n return onlyOwnDocuments;\n }\n}\n"]}
\No newline at end of file