@lenne.tech/ng-base 13.10.5 → 13.13.0

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.
Files changed (28) hide show
  1. package/base-components/base-components.module.d.ts +5 -3
  2. package/base-components/components/model-form/model-form.component.d.ts +66 -0
  3. package/base-components/components/model-table/model-table.component.d.ts +55 -0
  4. package/base-components/public-api.d.ts +2 -0
  5. package/esm2020/base-components/base-components.module.mjs +11 -3
  6. package/esm2020/base-components/components/checkbox/checkbox.component.mjs +2 -2
  7. package/esm2020/base-components/components/input/input.component.mjs +2 -2
  8. package/esm2020/base-components/components/model-form/model-form.component.mjs +174 -0
  9. package/esm2020/base-components/components/model-table/model-table.component.mjs +137 -0
  10. package/esm2020/base-components/components/select/select.component.mjs +2 -2
  11. package/esm2020/base-components/components/tags/tags.component.mjs +2 -2
  12. package/esm2020/base-components/components/textarea/textarea.component.mjs +2 -2
  13. package/esm2020/base-components/public-api.mjs +3 -1
  14. package/esm2020/shared/classes/graphql-meta.class.mjs +44 -1
  15. package/esm2020/shared/interfaces/graphql-crud-type.interface.mjs +2 -0
  16. package/esm2020/shared/public-api.mjs +2 -1
  17. package/fesm2015/lenne.tech-ng-base-base-components.mjs +319 -16
  18. package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
  19. package/fesm2015/lenne.tech-ng-base-shared.mjs +43 -0
  20. package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
  21. package/fesm2020/lenne.tech-ng-base-base-components.mjs +317 -16
  22. package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
  23. package/fesm2020/lenne.tech-ng-base-shared.mjs +43 -0
  24. package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
  25. package/package.json +1 -1
  26. package/shared/classes/graphql-meta.class.d.ts +10 -1
  27. package/shared/interfaces/graphql-crud-type.interface.d.ts +6 -0
  28. package/shared/public-api.d.ts +1 -0
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "angular-library",
11
11
  "angular13+"
12
12
  ],
13
- "version": "13.10.5",
13
+ "version": "13.13.0",
14
14
  "author": "lenne.Tech <info@lenne.tech> (https://lenne.tech)",
15
15
  "homepage": "https://github.com/lenneTech/ng-base",
16
16
  "license": "MIT",
@@ -1,7 +1,8 @@
1
- import { GraphQLSchema, GraphQLNamedType } from 'graphql';
1
+ import { GraphQLNamedType, GraphQLSchema } from 'graphql';
2
2
  import { GraphQLRequestType } from '../enums/graphql-request-type.enum';
3
3
  import { GraphQLType } from './graphql-type.class';
4
4
  import { IGraphQLTypeCollection } from '../interfaces/graphql-type-collection.interface';
5
+ import { GraphqlCrudType } from '../interfaces/graphql-crud-type.interface';
5
6
  /**
6
7
  * GraphQL meta
7
8
  */
@@ -13,6 +14,14 @@ export declare class GraphQLMeta {
13
14
  * Integrate schema
14
15
  */
15
16
  constructor(schema: GraphQLSchema);
17
+ /**
18
+ * We're going to get the query and mutation types from the schema, then we're going to loop through the fields of each
19
+ * type and check if the field name starts with `find`, `create`, `update`, or `delete`. If it does, we're going to add
20
+ * the model name to the `possibleTypes` array
21
+ *
22
+ * @returns An array of objects with the name of the model, and the CRUD operations that are available for that model.
23
+ */
24
+ getTypes(): GraphqlCrudType[];
16
25
  /**
17
26
  * Get arguments of GraphQL function
18
27
  */
@@ -0,0 +1,6 @@
1
+ export interface GraphqlCrudType {
2
+ name: string;
3
+ create: boolean;
4
+ update: boolean;
5
+ delete: boolean;
6
+ }
@@ -43,6 +43,7 @@ export * from './interfaces/find-args.interface';
43
43
  export * from './interfaces/time-components.interface';
44
44
  export * from './interfaces/toast.interface';
45
45
  export * from './interfaces/breadcrumb.interface';
46
+ export * from './interfaces/graphql-crud-type.interface';
46
47
  export * from './types/storage.type';
47
48
  export * from './types/graphql-fields.type';
48
49
  export * from './validators/match.validator';