ngx-material-entity 0.1.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 (76) hide show
  1. package/CONTRIBUTING.md +93 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +691 -0
  4. package/classes/entity-model.class.d.ts +9 -0
  5. package/classes/entity-service.class.d.ts +56 -0
  6. package/classes/entity-utilities.class.d.ts +95 -0
  7. package/components/confirm-dialog/confirm-dialog-data.d.ts +41 -0
  8. package/components/confirm-dialog/confirm-dialog.component.d.ts +18 -0
  9. package/components/confirm-dialog/confirm-dialog.module.d.ts +12 -0
  10. package/components/get-validation-error-message.function.d.ts +7 -0
  11. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.d.ts +35 -0
  12. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.d.ts +12 -0
  13. package/components/input/array-table/array-table.component.d.ts +34 -0
  14. package/components/input/array-table/array-table.module.d.ts +19 -0
  15. package/components/input/input.component.d.ts +73 -0
  16. package/components/input/input.module.d.ts +18 -0
  17. package/components/input/internal-input/internal-input.component.d.ts +57 -0
  18. package/components/input/internal-input/internal-input.module.d.ts +16 -0
  19. package/components/table/create-dialog/create-entity-dialog-data.d.ts +21 -0
  20. package/components/table/create-dialog/create-entity-dialog.component.d.ts +25 -0
  21. package/components/table/create-dialog/create-entity-dialog.module.d.ts +12 -0
  22. package/components/table/edit-dialog/edit-entity-dialog-data.d.ts +25 -0
  23. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +28 -0
  24. package/components/table/edit-dialog/edit-entity-dialog.module.d.ts +13 -0
  25. package/components/table/table-data.d.ts +184 -0
  26. package/components/table/table.component.d.ts +41 -0
  27. package/components/table/table.module.d.ts +17 -0
  28. package/decorators/array.decorator.d.ts +125 -0
  29. package/decorators/base/base-property.decorator.d.ts +9 -0
  30. package/decorators/base/decorator-types.enum.d.ts +28 -0
  31. package/decorators/base/property-decorator-config.interface.d.ts +50 -0
  32. package/decorators/boolean.decorator.d.ts +42 -0
  33. package/decorators/number.decorator.d.ts +40 -0
  34. package/decorators/object.decorator.d.ts +27 -0
  35. package/decorators/string.decorator.d.ts +76 -0
  36. package/esm2020/classes/entity-model.class.mjs +19 -0
  37. package/esm2020/classes/entity-service.class.mjs +70 -0
  38. package/esm2020/classes/entity-utilities.class.mjs +296 -0
  39. package/esm2020/components/confirm-dialog/confirm-dialog-data.mjs +2 -0
  40. package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +51 -0
  41. package/esm2020/components/confirm-dialog/confirm-dialog.module.mjs +22 -0
  42. package/esm2020/components/get-validation-error-message.function.mjs +32 -0
  43. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.mjs +43 -0
  44. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.mjs +22 -0
  45. package/esm2020/components/input/array-table/array-table.component.mjs +116 -0
  46. package/esm2020/components/input/array-table/array-table.module.mjs +66 -0
  47. package/esm2020/components/input/input.component.mjs +158 -0
  48. package/esm2020/components/input/input.module.mjs +62 -0
  49. package/esm2020/components/input/internal-input/internal-input.component.mjs +73 -0
  50. package/esm2020/components/input/internal-input/internal-input.module.mjs +54 -0
  51. package/esm2020/components/table/create-dialog/create-entity-dialog-data.mjs +2 -0
  52. package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +77 -0
  53. package/esm2020/components/table/create-dialog/create-entity-dialog.module.mjs +22 -0
  54. package/esm2020/components/table/edit-dialog/edit-entity-dialog-data.mjs +2 -0
  55. package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +112 -0
  56. package/esm2020/components/table/edit-dialog/edit-entity-dialog.module.mjs +42 -0
  57. package/esm2020/components/table/table-data.mjs +2 -0
  58. package/esm2020/components/table/table.component.mjs +232 -0
  59. package/esm2020/components/table/table.module.mjs +58 -0
  60. package/esm2020/decorators/array.decorator.mjs +70 -0
  61. package/esm2020/decorators/base/base-property.decorator.mjs +13 -0
  62. package/esm2020/decorators/base/decorator-types.enum.mjs +20 -0
  63. package/esm2020/decorators/base/property-decorator-config.interface.mjs +31 -0
  64. package/esm2020/decorators/boolean.decorator.mjs +44 -0
  65. package/esm2020/decorators/number.decorator.mjs +36 -0
  66. package/esm2020/decorators/object.decorator.mjs +23 -0
  67. package/esm2020/decorators/string.decorator.mjs +61 -0
  68. package/esm2020/ngx-material-entity.mjs +5 -0
  69. package/esm2020/public-api.mjs +32 -0
  70. package/fesm2015/ngx-material-entity.mjs +1786 -0
  71. package/fesm2015/ngx-material-entity.mjs.map +1 -0
  72. package/fesm2020/ngx-material-entity.mjs +1760 -0
  73. package/fesm2020/ngx-material-entity.mjs.map +1 -0
  74. package/ngx-material-entity.d.ts +5 -0
  75. package/package.json +40 -0
  76. package/public-api.d.ts +25 -0
@@ -0,0 +1,93 @@
1
+ # Contributing to NgxMaterialEntity
2
+ Thank you for considering to contribute to this project! As this is a first time open-source project, it is open for discussion to change anything regarding contributing, linting, workflow etc. at any point in time.
3
+ <br>
4
+ All development is done using github.
5
+
6
+ # Table of Contents
7
+ - [Contributing to NgxMaterialEntity](#contributing-to-ngxmaterialentity)
8
+ - [Table of Contents](#table-of-contents)
9
+ - [Create an Issue](#create-an-issue)
10
+ - [Special guidelines for bug reports](#special-guidelines-for-bug-reports)
11
+ - [Folder structure of the project](#folder-structure-of-the-project)
12
+ - [Starting the project](#starting-the-project)
13
+ - [Codestyle](#codestyle)
14
+ - [Decorator Configs / User Input](#decorator-configs--user-input)
15
+ - [Naming conventions](#naming-conventions)
16
+ - [Workflow for submitting Code Changes](#workflow-for-submitting-code-changes)
17
+ - [License](#license)
18
+
19
+ # Create an Issue
20
+ If you want to ask a question, need a new feature, found gaps in the documentation, found a bug, found code that can be refactored etc. you first have to start with creating an Issue.
21
+ <br>
22
+ Please check if there already is an issue for your problem.
23
+ <br>
24
+ Right now there are now specific guidelines for Issues, other than that their name and description should include enough details so that everyone knows what the issue is about. You should also include some fitting tags.
25
+
26
+ ## Special guidelines for bug reports
27
+
28
+ Great Bug Reports tend to have:
29
+
30
+ - A quick summary
31
+ - Steps to reproduce
32
+ - Be specific!
33
+ - Give sample code if you can
34
+ - What you expected would happen
35
+ - What actually happens
36
+ - Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
37
+
38
+ # Folder structure of the project
39
+ The project contains an simple api for testing inside the files `api-data.ts` and `api.ts`.
40
+ <br>
41
+ The main projects are the library itself which will be published to npm and an showcase project used for trying things out. They can be found inside the `project/ngx-material-entity` and `projects/ngx-material-entity-showcase` directories
42
+
43
+ # Starting the project
44
+ 1. Run `npm install` in the root directory,
45
+ 2. Run `npm install` in the project/ngx-material-entity directory
46
+ 3. Run `npm run stack` in the root directory. This will start the api, the build-process of the library aswell as the showcase project all in watch-mode (hot reload). That's it! You will probably only ever need this single command.
47
+ > :information_source: About package.json
48
+ > <br>
49
+ > If you open the package.json in the root directory you will probably notice that it looks a bit messy. That is mainly because:
50
+ > 1. the scripts should support Windows which means that commands like `cp` or even just chaining stuff with `&&` is not available and needed to be replaced with node alternatives.
51
+ > 2. Some of the CD process is done here aswell
52
+
53
+ # Codestyle
54
+ This project is using eslint and requires all linting to pass in order to merge pull requests. It can happen that you need to use code that is against some of the rules (e.g. required use of "any"). In that case you can of course disable that rule at that specific point with
55
+ <br>
56
+ `// eslint-disable-next-line the-rule-to-disable`
57
+ > You can run eslint with the command `npm run lint`
58
+ > <br>
59
+ > You can autofix some codestyle problems with `npm run lint:fix`
60
+
61
+ ## Decorator Configs / User Input
62
+ Every Input the user can make (e.g. with the decorators or with @Input()) should be split up in two different models.
63
+
64
+ The first model should be used internal and require all input. The second model should only require values where no default value can be set. The second model should only be used by the user and never internally.
65
+
66
+ That way the components can be highly customizable without requiring the user to input the whole configuration. With the internal model that requires all values we also ensure that newly added configuration options aren't (as easily) forgotten somewhere.
67
+
68
+ ## Naming conventions
69
+
70
+ All angular components / modules inside the library(projects/ngx-material-entity) should be named "`NgxMatEntity`MyGreatComponentOrModule".
71
+
72
+ Their selector should follow the same logic:
73
+ <br>
74
+ "`ngx-mat-entity`-my-great-component-or-module"
75
+
76
+ In the folder structure however, you are encouraged to leave the prefix out, because the user will never see this anyway.
77
+
78
+ # Workflow for submitting Code Changes
79
+
80
+ 1. Create an issue if it not already exists.
81
+ 2. Create a branch for that specific issue (The best way to this is directly inside the issue on the right side under "Development". That way the the issue and the branch are automatically linked)
82
+ 3. Checkout the new branch
83
+ 4. Add your code
84
+ 5. Update / add tests.
85
+ 6. Update the documentation.
86
+ 7. Check that tests and linting passes.
87
+ 1. For tests: `npm run test`
88
+ 2. For linting: `npm run lint` / `npm run lint:fix`
89
+ 8. Rebase to dev and solve any merge-conflicts (`git rebase dev`)
90
+ 9. Issue that pull request!
91
+
92
+ # License
93
+ By contributing to this project, you agree that your contributions will be licensed under its MIT License.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Tim Fabian
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.