special-forms 1.0.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 (182) hide show
  1. package/.editorconfig +16 -0
  2. package/.storybook/db-theme.js +8 -0
  3. package/.storybook/main.js +15 -0
  4. package/.storybook/manager.js +7 -0
  5. package/.storybook/preview-head.html +16 -0
  6. package/.storybook/preview.js +20 -0
  7. package/.storybook/tsconfig.json +21 -0
  8. package/.storybook/typings.d.ts +4 -0
  9. package/.vscode/extensions.json +4 -0
  10. package/.vscode/launch.json +20 -0
  11. package/.vscode/tasks.json +42 -0
  12. package/README.md +27 -0
  13. package/angular.json +38 -0
  14. package/documentation.json +10829 -0
  15. package/package.json +65 -0
  16. package/projects/special-forms/README.md +24 -0
  17. package/projects/special-forms/karma.conf.js +44 -0
  18. package/projects/special-forms/ng-package.json +7 -0
  19. package/projects/special-forms/package.json +11 -0
  20. package/projects/special-forms/src/lib/assets/styles.scss +213 -0
  21. package/projects/special-forms/src/lib/assets/themes/dark.scss +80 -0
  22. package/projects/special-forms/src/lib/assets/themes/light.scss +78 -0
  23. package/projects/special-forms/src/lib/aux-storybook-components/form-control-selector/form-control-selector.component.html +5 -0
  24. package/projects/special-forms/src/lib/aux-storybook-components/form-control-selector/form-control-selector.component.scss +6 -0
  25. package/projects/special-forms/src/lib/aux-storybook-components/form-control-selector/form-control-selector.component.spec.ts +21 -0
  26. package/projects/special-forms/src/lib/aux-storybook-components/form-control-selector/form-control-selector.component.ts +21 -0
  27. package/projects/special-forms/src/lib/aux-storybook-components/form-control-selector/form-control-selector.module.ts +36 -0
  28. package/projects/special-forms/src/lib/aux-storybook-components/form-control-viewer/form-control-viewer.component.html +5 -0
  29. package/projects/special-forms/src/lib/aux-storybook-components/form-control-viewer/form-control-viewer.component.scss +18 -0
  30. package/projects/special-forms/src/lib/aux-storybook-components/form-control-viewer/form-control-viewer.component.spec.ts +23 -0
  31. package/projects/special-forms/src/lib/aux-storybook-components/form-control-viewer/form-control-viewer.component.ts +66 -0
  32. package/projects/special-forms/src/lib/aux-storybook-components/form-control-viewer/form-control-viewer.module.ts +16 -0
  33. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/control-dialog.component.html +31 -0
  34. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/control-dialog.component.scss +0 -0
  35. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/control-dialog.component.spec.ts +22 -0
  36. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/control-dialog.component.ts +102 -0
  37. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/autocomplete.form.ts +87 -0
  38. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/checkbox.form.ts +51 -0
  39. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/common.form.interface.ts +24 -0
  40. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/common.form.ts +31 -0
  41. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/datepicker.form.ts +56 -0
  42. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/dropdown.form.ts +80 -0
  43. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/field.form.ts +189 -0
  44. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/input.form.ts +71 -0
  45. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/label.form.ts +33 -0
  46. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/text-area.form.ts +17 -0
  47. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/components/settings-strategy/upload.form.ts +35 -0
  48. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/form-group-viewer.component.html +37 -0
  49. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/form-group-viewer.component.scss +41 -0
  50. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/form-group-viewer.component.spec.ts +22 -0
  51. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/form-group-viewer.component.ts +95 -0
  52. package/projects/special-forms/src/lib/aux-storybook-components/form-group-viewer/form-group-viewer.module.ts +32 -0
  53. package/projects/special-forms/src/lib/components/index.ts +61 -0
  54. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.component.html +62 -0
  55. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.component.scss +3 -0
  56. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.component.spec.ts +24 -0
  57. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.component.ts +58 -0
  58. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.interface.ts +20 -0
  59. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.module.ts +25 -0
  60. package/projects/special-forms/src/lib/components/special-autocomplete/special-autocomplete.stories.ts +81 -0
  61. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.component.html +17 -0
  62. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.component.scss +3 -0
  63. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.component.spec.ts +23 -0
  64. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.component.ts +19 -0
  65. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.interface.ts +12 -0
  66. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.module.ts +25 -0
  67. package/projects/special-forms/src/lib/components/special-checkbox/special-checkbox.stories.ts +76 -0
  68. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.component.html +26 -0
  69. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.component.scss +3 -0
  70. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.component.spec.ts +23 -0
  71. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.component.ts +21 -0
  72. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.interface.ts +13 -0
  73. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.module.ts +26 -0
  74. package/projects/special-forms/src/lib/components/special-datepicker/special-datepicker.stories.ts +69 -0
  75. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.component.html +41 -0
  76. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.component.scss +15 -0
  77. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.component.spec.ts +24 -0
  78. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.component.ts +34 -0
  79. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.interface.ts +18 -0
  80. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.module.ts +22 -0
  81. package/projects/special-forms/src/lib/components/special-dropdown/special-dropdown.stories.ts +83 -0
  82. package/projects/special-forms/src/lib/components/special-form/special-form-array.component.html +208 -0
  83. package/projects/special-forms/src/lib/components/special-form/special-form-array.component.scss +70 -0
  84. package/projects/special-forms/src/lib/components/special-form/special-form-array.component.spec.ts +23 -0
  85. package/projects/special-forms/src/lib/components/special-form/special-form-array.module.ts +18 -0
  86. package/projects/special-forms/src/lib/components/special-form/special-form.component.html +20 -0
  87. package/projects/special-forms/src/lib/components/special-form/special-form.component.scss +3 -0
  88. package/projects/special-forms/src/lib/components/special-form/special-form.component.spec.ts +22 -0
  89. package/projects/special-forms/src/lib/components/special-form/special-form.component.ts +85 -0
  90. package/projects/special-forms/src/lib/components/special-form/special-form.module.ts +40 -0
  91. package/projects/special-forms/src/lib/components/special-form/special-form.stories.ts +45 -0
  92. package/projects/special-forms/src/lib/components/special-input/special-input.component.html +37 -0
  93. package/projects/special-forms/src/lib/components/special-input/special-input.component.scss +3 -0
  94. package/projects/special-forms/src/lib/components/special-input/special-input.component.spec.ts +23 -0
  95. package/projects/special-forms/src/lib/components/special-input/special-input.component.ts +39 -0
  96. package/projects/special-forms/src/lib/components/special-input/special-input.interface.ts +17 -0
  97. package/projects/special-forms/src/lib/components/special-input/special-input.module.ts +24 -0
  98. package/projects/special-forms/src/lib/components/special-input/special-input.stories.ts +91 -0
  99. package/projects/special-forms/src/lib/components/special-label/special-label.component.html +6 -0
  100. package/projects/special-forms/src/lib/components/special-label/special-label.component.scss +3 -0
  101. package/projects/special-forms/src/lib/components/special-label/special-label.component.spec.ts +23 -0
  102. package/projects/special-forms/src/lib/components/special-label/special-label.component.ts +27 -0
  103. package/projects/special-forms/src/lib/components/special-label/special-label.interface.ts +14 -0
  104. package/projects/special-forms/src/lib/components/special-label/special-label.module.ts +25 -0
  105. package/projects/special-forms/src/lib/components/special-label/special-label.stories.ts +99 -0
  106. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.html +82 -0
  107. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.scss +3 -0
  108. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.spec.ts +23 -0
  109. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.ts +86 -0
  110. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.ts +20 -0
  111. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.module.ts +28 -0
  112. package/projects/special-forms/src/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.stories.ts +81 -0
  113. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.component.html +29 -0
  114. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.component.scss +3 -0
  115. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.component.spec.ts +23 -0
  116. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.component.ts +20 -0
  117. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.interface.ts +9 -0
  118. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.module.ts +24 -0
  119. package/projects/special-forms/src/lib/components/special-text-area/special-text-area.stories.ts +69 -0
  120. package/projects/special-forms/src/lib/components/special-upload/special-upload.component.html +50 -0
  121. package/projects/special-forms/src/lib/components/special-upload/special-upload.component.scss +29 -0
  122. package/projects/special-forms/src/lib/components/special-upload/special-upload.component.spec.ts +23 -0
  123. package/projects/special-forms/src/lib/components/special-upload/special-upload.component.ts +79 -0
  124. package/projects/special-forms/src/lib/components/special-upload/special-upload.interface.ts +12 -0
  125. package/projects/special-forms/src/lib/components/special-upload/special-upload.module.ts +23 -0
  126. package/projects/special-forms/src/lib/components/special-upload/special-upload.stories.ts +81 -0
  127. package/projects/special-forms/src/lib/core/aux-data/all-icons.ts +99 -0
  128. package/projects/special-forms/src/lib/core/aux-data/control-types.enum.ts +16 -0
  129. package/projects/special-forms/src/lib/core/aux-data/countries.ts +247 -0
  130. package/projects/special-forms/src/lib/core/aux-data/field-basic-data.ts +14 -0
  131. package/projects/special-forms/src/lib/core/aux-data/input-types.ts +23 -0
  132. package/projects/special-forms/src/lib/core/controls/icons.control.ts +8 -0
  133. package/projects/special-forms/src/lib/core/controls/index.ts +2 -0
  134. package/projects/special-forms/src/lib/core/controls/theme.control.ts +1 -0
  135. package/projects/special-forms/src/lib/core/controls/types.control.ts +9 -0
  136. package/projects/special-forms/src/lib/core/directives/control-render.directive.ts +19 -0
  137. package/projects/special-forms/src/lib/core/directives/control-render.module.ts +10 -0
  138. package/projects/special-forms/src/lib/core/forms/special-forms.ts +395 -0
  139. package/projects/special-forms/src/lib/core/interfaces/field-basics.interfaces.ts +22 -0
  140. package/projects/special-forms/src/lib/core/interfaces/form.interfaces.ts +83 -0
  141. package/projects/special-forms/src/lib/core/interfaces/special-control.interface.ts +9 -0
  142. package/projects/special-forms/src/lib/core/masks/currency.mask.ts +11 -0
  143. package/projects/special-forms/src/lib/core/masks/maks.enum.ts +12 -0
  144. package/projects/special-forms/src/lib/core/masks/number.mask.ts +4 -0
  145. package/projects/special-forms/src/lib/core/services/index.ts +3 -0
  146. package/projects/special-forms/src/lib/core/services/special-form-builder/special-form-builder.service.spec.ts +16 -0
  147. package/projects/special-forms/src/lib/core/services/special-form-builder/special-form-builder.service.ts +220 -0
  148. package/projects/special-forms/src/lib/core/utils/enum-to-array.util.ts +6 -0
  149. package/projects/special-forms/src/lib/pipes/controls-list-pipe/controls-list.pipe.module.ts +10 -0
  150. package/projects/special-forms/src/lib/pipes/controls-list-pipe/controls-list.pipe.ts +17 -0
  151. package/projects/special-forms/src/lib/pipes/error-message-pipe/error.pipe.module.ts +13 -0
  152. package/projects/special-forms/src/lib/pipes/error-message-pipe/error.pipe.ts +21 -0
  153. package/projects/special-forms/src/lib/pipes/index.ts +3 -0
  154. package/projects/special-forms/src/lib/pipes/text-by-function/text-by-function.pipe.module.ts +13 -0
  155. package/projects/special-forms/src/lib/pipes/text-by-function/text-by-function.pipe.ts +14 -0
  156. package/projects/special-forms/src/public-api.ts +8 -0
  157. package/projects/special-forms/src/test.ts +27 -0
  158. package/projects/special-forms/tsconfig.lib.json +15 -0
  159. package/projects/special-forms/tsconfig.lib.prod.json +10 -0
  160. package/projects/special-forms/tsconfig.spec.json +17 -0
  161. package/scss-bundle.config.json +6 -0
  162. package/stories/Button.stories.ts +42 -0
  163. package/stories/Header.stories.ts +35 -0
  164. package/stories/Introduction.stories.mdx +211 -0
  165. package/stories/Page.stories.ts +36 -0
  166. package/stories/User.ts +2 -0
  167. package/stories/assets/code-brackets.svg +1 -0
  168. package/stories/assets/colors.svg +1 -0
  169. package/stories/assets/comments.svg +1 -0
  170. package/stories/assets/direction.svg +1 -0
  171. package/stories/assets/flow.svg +1 -0
  172. package/stories/assets/plugin.svg +1 -0
  173. package/stories/assets/repo.svg +1 -0
  174. package/stories/assets/stackalt.svg +1 -0
  175. package/stories/button.component.ts +53 -0
  176. package/stories/button.css +30 -0
  177. package/stories/header.component.ts +75 -0
  178. package/stories/header.css +32 -0
  179. package/stories/page.component.ts +77 -0
  180. package/stories/page.css +69 -0
  181. package/tailwind.config.js +30 -0
  182. package/tsconfig.json +39 -0
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "special-forms",
3
+ "version": "1.0.0",
4
+ "scripts": {
5
+ "ng": "ng",
6
+ "start": "ng serve",
7
+ "build": "ng build",
8
+ "watch": "ng build --watch --configuration development",
9
+ "test": "ng test",
10
+ "build:scss": "scss-bundle -p scss-bundle.config.json",
11
+ "build:lib": "ng build special-forms && npm run build:scss",
12
+ "docs:json": "compodoc -p ./tsconfig.json -e json -d .",
13
+ "storybook": "yarn docs:json && start-storybook -p 6006",
14
+ "build-storybook": "yarn docs:json && build-storybook"
15
+ },
16
+ "dependencies": {
17
+ "@angular/animations": "^14.1.0",
18
+ "@angular/cdk": "14.1.3",
19
+ "@angular/common": "^14.1.0",
20
+ "@angular/compiler": "^14.1.0",
21
+ "@angular/core": "^14.1.0",
22
+ "@angular/forms": "^14.1.0",
23
+ "@angular/material": "14.1.3",
24
+ "@angular/platform-browser": "^14.1.0",
25
+ "@angular/platform-browser-dynamic": "^14.1.0",
26
+ "@angular/router": "^14.1.0",
27
+ "@ngneat/input-mask": "5.2.0",
28
+ "inputmask": "^5.0.7",
29
+ "ngx-dropzone": "^3.1.0",
30
+ "rxjs": "~7.5.0",
31
+ "tslib": "^2.3.0",
32
+ "zone.js": "~0.11.4"
33
+ },
34
+ "devDependencies": {
35
+ "@angular-devkit/build-angular": "^14.1.3",
36
+ "@angular/cli": "~14.1.2",
37
+ "@angular/compiler-cli": "^14.1.0",
38
+ "@babel/core": "^7.18.13",
39
+ "@compodoc/compodoc": "^1.1.19",
40
+ "@storybook/addon-actions": "^6.5.16",
41
+ "@storybook/addon-essentials": "^6.5.16",
42
+ "@storybook/addon-interactions": "^6.5.16",
43
+ "@storybook/addon-links": "^6.5.16",
44
+ "@storybook/angular": "^6.5.16",
45
+ "@storybook/builder-webpack5": "^6.5.16",
46
+ "@storybook/manager-webpack5": "^6.5.16",
47
+ "@storybook/testing-library": "^0.0.13",
48
+ "@types/inputmask": "^5.0.3",
49
+ "@types/jasmine": "~4.0.0",
50
+ "autoprefixer": "^10.4.8",
51
+ "babel-loader": "^8.2.5",
52
+ "jasmine-core": "~4.2.0",
53
+ "karma": "~6.4.0",
54
+ "karma-chrome-launcher": "~3.1.0",
55
+ "karma-coverage": "~2.2.0",
56
+ "karma-jasmine": "~5.1.0",
57
+ "karma-jasmine-html-reporter": "~2.0.0",
58
+ "ng-packagr": "^14.1.0",
59
+ "postcss": "^8.4.16",
60
+ "scss-bundle": "^3.1.2",
61
+ "storybook-dark-mode": "^2.0.5",
62
+ "tailwindcss": "^3.1.8",
63
+ "typescript": "~4.7.2"
64
+ }
65
+ }
@@ -0,0 +1,24 @@
1
+ # SpecialForms
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project special-forms` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project special-forms`.
8
+ > Note: Don't forget to add `--project special-forms` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build special-forms` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build special-forms`, go to the dist folder `cd dist/special-forms` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test special-forms` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,44 @@
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-chrome-launcher'),
11
+ require('karma-jasmine-html-reporter'),
12
+ require('karma-coverage'),
13
+ require('@angular-devkit/build-angular/plugins/karma')
14
+ ],
15
+ client: {
16
+ jasmine: {
17
+ // you can add configuration options for Jasmine here
18
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
+ // for example, you can disable the random execution with `random: false`
20
+ // or set a specific seed with `seed: 4321`
21
+ },
22
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
23
+ },
24
+ jasmineHtmlReporter: {
25
+ suppressAll: true // removes the duplicated traces
26
+ },
27
+ coverageReporter: {
28
+ dir: require('path').join(__dirname, '../../coverage/special-forms'),
29
+ subdir: '.',
30
+ reporters: [
31
+ { type: 'html' },
32
+ { type: 'text-summary' }
33
+ ]
34
+ },
35
+ reporters: ['progress', 'kjhtml'],
36
+ port: 9876,
37
+ colors: true,
38
+ logLevel: config.LOG_INFO,
39
+ autoWatch: true,
40
+ browsers: ['Chrome'],
41
+ singleRun: false,
42
+ restartOnFileChange: true
43
+ });
44
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/special-forms",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "special-forms",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^14.1.0",
6
+ "@angular/core": "^14.1.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ }
11
+ }
@@ -0,0 +1,213 @@
1
+ @use '@angular/material' as mat;
2
+ @use "sass:map";
3
+ @include mat.core();
4
+ @import "@angular/material/theming";
5
+ @import "tailwindcss/base";
6
+ @import "tailwindcss/components";
7
+ @import "tailwindcss/utilities";
8
+ @import "./themes/dark.scss";
9
+ @import "./themes/light.scss";
10
+
11
+ @include mat.all-component-themes($light-theme);
12
+
13
+ .dark-theme {
14
+ @include mat.all-component-colors($dark-theme);
15
+ color: $dark-text;
16
+ .mat-menu-content,
17
+ .mat-select-panel,
18
+ .mat-datepicker-content,
19
+ .special_upload__dropzone,
20
+ .mat-autocomplete-panel {
21
+ background: linear-gradient(
22
+ 93deg,
23
+ rgba(0, 0, 0, 1) 0%,
24
+ rgba(29, 43, 69, 1) 0%,
25
+ rgba(27, 15, 46, 1) 100%
26
+ );
27
+ }
28
+
29
+ .mat-select-value,
30
+ .mat-datepicker-content,
31
+ .special_upload__dropzone,
32
+ .mat-calendar-body-cell-content,
33
+ .mat-calendar-body-selected,
34
+ .mat-calendar-body-today,
35
+ .mat-datepicker-content .mat-calendar-next-button,
36
+ .mat-datepicker-content .mat-calendar-previous-button,
37
+ .mat-datepicker-toggle,
38
+ .mat-calendar-body-disabled,
39
+ .mat-option-text {
40
+ color: $dark-text;
41
+ }
42
+
43
+ .special_upload__dropzone {
44
+ border-color: $dark-text;
45
+ }
46
+
47
+ .mat-calendar-arrow {
48
+ fill: $dark-text;
49
+ }
50
+ }
51
+ // color: rgb(160, 160, 160);
52
+
53
+ // .special_upload {
54
+ // &__title{
55
+
56
+ // }
57
+ // &__dropzone {
58
+ // background-color: #0a101f;
59
+ // color: white;
60
+ // }
61
+
62
+ // &--error-dashed {
63
+ // border: 2px dashed map.get(mat.$red-palette, 500) !important;
64
+ // }
65
+
66
+ // &--error {
67
+ // color: map.get(mat.$red-palette, 500) !important;
68
+ // }
69
+ // }
70
+ // }
71
+
72
+ // .dialog-panel {
73
+ // &-no-padding {
74
+ // .mat-dialog-container {
75
+ // padding: 0px !important;
76
+ // border-radius: 9px;
77
+ // }
78
+ // }
79
+ // }
80
+ // .dark {
81
+ // background-color: rgb(16, 22, 37);
82
+ // border-radius: 8px;
83
+ // mat-label,
84
+ // mat-hint,
85
+ // mat-icon {
86
+ // color: rgb(160, 160, 160);
87
+ // }
88
+
89
+ // .mat-calendar {
90
+ // background: linear-gradient(
91
+ // 93deg,
92
+ // rgba(0, 0, 0, 1) 0%,
93
+ // rgba(29, 43, 69, 1) 0%,
94
+ // rgba(27, 15, 46, 1) 100%
95
+ // );
96
+ // }
97
+
98
+ // .mat-focused .mat-form-field-label {
99
+ // /*change color of label*/
100
+ // color: white !important;
101
+ // }
102
+
103
+ // .mat-form-field-underline {
104
+ // /*change color of underline*/
105
+ // background-color: white !important;
106
+ // }
107
+
108
+ // .mat-form-field-ripple {
109
+ // /*change color of underline when focused*/
110
+ // background-color: white !important;
111
+ // }
112
+
113
+ // .mat-form-field-label {
114
+ // /*change color of label*/
115
+ // color: white !important;
116
+ // }
117
+
118
+ // mat-datepicker-toggle {
119
+ // color: white !important;
120
+ // }
121
+
122
+ // .autocomplete-options {
123
+ // background: linear-gradient(
124
+ // 93deg,
125
+ // rgba(0, 0, 0, 1) 0%,
126
+ // rgba(29, 43, 69, 1) 0%,
127
+ // rgba(27, 15, 46, 1) 100%
128
+ // );
129
+ // }
130
+
131
+ // .mat-form-field-outline {
132
+ // background-color: rgb(16, 22, 37);
133
+ // border-radius: 15px;
134
+ // }
135
+
136
+ // .mat-form-field-outline-start {
137
+ // border-radius: 15px 0 0 15px !important;
138
+ // min-width: 15px !important;
139
+ // }
140
+
141
+ // .mat-form-field-outline-end {
142
+ // border-radius: 0 15px 15px 0 !important;
143
+ // }
144
+
145
+ // input {
146
+ // color: rgb(160, 160, 160);
147
+
148
+ // &::placeholder {
149
+ // color: rgb(160, 160, 160);
150
+ // }
151
+ // }
152
+
153
+ // .mat-form-field-outline {
154
+ // background-color: rgb(16, 22, 37);
155
+ // border-radius: 15px;
156
+ // }
157
+ // .mat-select-panel {
158
+ // background: linear-gradient(
159
+ // 93deg,
160
+ // rgba(0, 0, 0, 1) 0%,
161
+ // rgba(29, 43, 69, 1) 0%,
162
+ // rgba(27, 15, 46, 1) 100%
163
+ // );
164
+ // }
165
+
166
+ // .mat-select-arrow {
167
+ // color: rgb(160, 160, 160);
168
+ // }
169
+
170
+ // .mat-select-min-line {
171
+ // color: rgb(160, 160, 160);
172
+ // }
173
+
174
+ // .mat-form-field-outline-start {
175
+ // border-radius: 15px 0 0 15px !important;
176
+ // min-width: 15px !important;
177
+ // }
178
+
179
+ // .mat-form-field-outline-end {
180
+ // border-radius: 0 15px 15px 0 !important;
181
+ // }
182
+
183
+ // input {
184
+ // color: rgb(160, 160, 160);
185
+
186
+ // &::placeholder {
187
+ // color: rgb(160, 160, 160);
188
+ // }
189
+ // }
190
+ // .mat-option-text {
191
+ // color: rgb(160, 160, 160);
192
+ // }
193
+
194
+ // ::-webkit-scrollbar {
195
+ // width: 16px;
196
+ // height: 4px;
197
+ // }
198
+
199
+ // ::-webkit-scrollbar-track {
200
+ // background-color: rgb(16, 22, 37);
201
+ // }
202
+
203
+ // ::-webkit-scrollbar-thumb {
204
+ // border-radius: 8px;
205
+ // height: 46px;
206
+ // background: linear-gradient(
207
+ // 180deg,
208
+ // rgb(27, 41, 66, 1) 0%,
209
+ // rgb(27, 16, 46, 1) 100%
210
+ // );
211
+ // outline: 1px solid rgb(27, 16, 46, 1);
212
+ // }
213
+ // }
@@ -0,0 +1,80 @@
1
+ $primary-dark-palette: (
2
+ 50: #e0f5f9,
3
+ 100: #b3e5f0,
4
+ 200: #80d4e6,
5
+ 300: #4dc2db,
6
+ 400: #26b5d4,
7
+ 500: #00a8cc,
8
+ 600: #00a0c7,
9
+ 700: #0097c0,
10
+ 800: #008db9,
11
+ 900: #007dad,
12
+ A100: #d7f2ff,
13
+ A200: #a4e1ff,
14
+ A400: #71d1ff,
15
+ A700: #58c9ff,
16
+ contrast: (
17
+ 50: #000000,
18
+ 100: #000000,
19
+ 200: #000000,
20
+ 300: #000000,
21
+ 400: #000000,
22
+ 500: #ffffff,
23
+ 600: #ffffff,
24
+ 700: #ffffff,
25
+ 800: #ffffff,
26
+ 900: #ffffff,
27
+ A100: #000000,
28
+ A200: #000000,
29
+ A400: #000000,
30
+ A700: #000000,
31
+ ),
32
+ );
33
+
34
+ $accent-dark-palette: (
35
+ 50: #ebf2ef,
36
+ 100: #ceddd7,
37
+ 200: #adc7bd,
38
+ 300: #8cb1a3,
39
+ 400: #73a08f,
40
+ 500: #5a8f7b,
41
+ 600: #528773,
42
+ 700: #487c68,
43
+ 800: #3f725e,
44
+ 900: #2e604b,
45
+ A100: #abffdb,
46
+ A200: #78ffc5,
47
+ A400: #45ffaf,
48
+ A700: #2bffa4,
49
+ contrast: (
50
+ 50: #000000,
51
+ 100: #000000,
52
+ 200: #000000,
53
+ 300: #000000,
54
+ 400: #000000,
55
+ 500: #ffffff,
56
+ 600: #ffffff,
57
+ 700: #ffffff,
58
+ 800: #ffffff,
59
+ 900: #ffffff,
60
+ A100: #000000,
61
+ A200: #000000,
62
+ A400: #000000,
63
+ A700: #000000,
64
+ ),
65
+ );
66
+
67
+ $primary-dark: mat.define-palette($primary-dark-palette);
68
+ $accent-dark: mat.define-palette($accent-dark-palette);
69
+ $warn: mat.define-palette(mat.$red-palette);
70
+ $dark-text: rgb(200, 200, 200);
71
+
72
+ $dark-theme: mat.define-dark-theme(
73
+ (
74
+ color: (
75
+ primary: $primary-dark,
76
+ accent: $accent-dark,
77
+ warn: $warn,
78
+ ),
79
+ )
80
+ );
@@ -0,0 +1,78 @@
1
+ $primary-light-palette: (
2
+ 50: #e4e6e9,
3
+ 100: #bbbfc7,
4
+ 200: #8e95a2,
5
+ 300: #616b7d,
6
+ 400: #3f4b61,
7
+ 500: #1d2b45,
8
+ 600: #1a263e,
9
+ 700: #152036,
10
+ 800: #111a2e,
11
+ 900: #0a101f,
12
+ A100: #5e89ff,
13
+ A200: #2b64ff,
14
+ A400: #0042f7,
15
+ A700: #003bde,
16
+ contrast: (
17
+ 50: #000000,
18
+ 100: #000000,
19
+ 200: #000000,
20
+ 300: #ffffff,
21
+ 400: #ffffff,
22
+ 500: #ffffff,
23
+ 600: #ffffff,
24
+ 700: #ffffff,
25
+ 800: #ffffff,
26
+ 900: #ffffff,
27
+ A100: #000000,
28
+ A200: #ffffff,
29
+ A400: #ffffff,
30
+ A700: #ffffff,
31
+ ),
32
+ );
33
+ $accent-light-palette: (
34
+ 50: #eafcfc,
35
+ 100: #cbf9f7,
36
+ 200: #a9f5f1,
37
+ 300: #87f0eb,
38
+ 400: #6dede7,
39
+ 500: #53eae3,
40
+ 600: #4ce7e0,
41
+ 700: #42e4dc,
42
+ 800: #39e1d8,
43
+ 900: #29dbd0,
44
+ A100: #ffffff,
45
+ A200: #e6fffd,
46
+ A400: #b3fffa,
47
+ A700: #9afff9,
48
+ contrast: (
49
+ 50: #000000,
50
+ 100: #000000,
51
+ 200: #000000,
52
+ 300: #000000,
53
+ 400: #000000,
54
+ 500: #000000,
55
+ 600: #000000,
56
+ 700: #000000,
57
+ 800: #000000,
58
+ 900: #000000,
59
+ A100: #000000,
60
+ A200: #000000,
61
+ A400: #000000,
62
+ A700: #000000,
63
+ ),
64
+ );
65
+
66
+ $primary-light: mat.define-palette($primary-light-palette);
67
+ $accent-light: mat.define-palette($accent-light-palette);
68
+ $warn-light: mat.define-palette(mat.$red-palette);
69
+
70
+ $light-theme: mat.define-light-theme(
71
+ (
72
+ color: (
73
+ primary: $primary-light,
74
+ accent: $accent-light,
75
+ warn: $warn-light
76
+ ),
77
+ )
78
+ );
@@ -0,0 +1,5 @@
1
+ <ng-template
2
+ controlRender
3
+ [components]="componentsBuffer"
4
+ [control]="control"
5
+ ></ng-template>
@@ -0,0 +1,6 @@
1
+ @import "../../assets/styles.scss";
2
+ :host{
3
+ display: contents;
4
+ }
5
+
6
+
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { FormControlSelectorComponent } from './form-control-selector.component';
3
+ describe('FormControlSelectorComponent', () => {
4
+ let component: FormControlSelectorComponent;
5
+ let fixture: ComponentFixture<FormControlSelectorComponent>;
6
+
7
+ beforeEach(async () => {
8
+ await TestBed.configureTestingModule({
9
+ declarations: [ FormControlSelectorComponent ]
10
+ })
11
+ .compileComponents();
12
+
13
+ fixture = TestBed.createComponent(FormControlSelectorComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,21 @@
1
+ import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
2
+ import { ComponentsBuffer } from '@lib/components/special-form/special-form.component';
3
+ import { EControlTypes } from '../../core/aux-data/control-types.enum';
4
+ import { SpecialFormControl } from '../../core/forms/special-forms';
5
+ @Component({
6
+ selector: 'sp-form-control-selector',
7
+ templateUrl: './form-control-selector.component.html',
8
+ styleUrls: ['./form-control-selector.component.scss'],
9
+ encapsulation: ViewEncapsulation.None,
10
+ })
11
+ export class FormControlSelectorComponent implements OnInit {
12
+ @Input() control: SpecialFormControl<any>;
13
+
14
+ componentsBuffer=ComponentsBuffer
15
+
16
+ get controlTypes(): typeof EControlTypes {
17
+ return EControlTypes;
18
+ }
19
+
20
+ ngOnInit(): void {}
21
+ }
@@ -0,0 +1,36 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import {
4
+ SpecialDropdownModule,
5
+ SpecialInputModule,
6
+ SpecialAutocompleteModule,
7
+ SpecialDatepickerModule,
8
+ SpecialMultipleAutocompleteModule,
9
+ SpecialCheckboxModule,
10
+ SpecialTextAreaModule,
11
+ SpecialUploadModule,
12
+ SpecialArrayModule,
13
+ SpecialLabelModule,
14
+ } from '../../components';
15
+ import { FormControlSelectorComponent } from './form-control-selector.component';
16
+ import { ControlsRenderDirectiveModule } from '../../core/directives/control-render.module';
17
+
18
+ @NgModule({
19
+ declarations: [FormControlSelectorComponent],
20
+ imports: [
21
+ CommonModule,
22
+ ControlsRenderDirectiveModule,
23
+ SpecialMultipleAutocompleteModule,
24
+ SpecialDatepickerModule,
25
+ SpecialInputModule,
26
+ SpecialDropdownModule,
27
+ SpecialAutocompleteModule,
28
+ SpecialCheckboxModule,
29
+ SpecialTextAreaModule,
30
+ SpecialUploadModule,
31
+ SpecialArrayModule,
32
+ SpecialLabelModule
33
+ ],
34
+ exports: [FormControlSelectorComponent],
35
+ })
36
+ export class FormControlSelectorModule {}
@@ -0,0 +1,5 @@
1
+ <div class="p-5 {{theme}}" *ngIf="control">
2
+ <div class="text">Tipo: {{ control.type }}</div>
3
+ <sp-form-control-selector [control]="control"></sp-form-control-selector>
4
+ <div class="mt-4 text">Valor: {{ control.value | json }}</div>
5
+ </div>
@@ -0,0 +1,18 @@
1
+ :host {
2
+ display: contents;
3
+ .dark-theme {
4
+ background: linear-gradient(
5
+ 93deg,
6
+ rgb(0, 0, 0) 0%,
7
+ rgb(29, 43, 69) 0%,
8
+ rgb(27, 15, 46) 100%
9
+ );
10
+ .text {
11
+ color: rgb(200, 200, 200);
12
+ }
13
+ }
14
+
15
+ .light-theme {
16
+ background-color: white;
17
+ }
18
+ }
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { FormControlViewerComponent } from './form-control-viewer.component';
4
+
5
+ describe('FormControlViewerComponent', () => {
6
+ let component: FormControlViewerComponent;
7
+ let fixture: ComponentFixture<FormControlViewerComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ FormControlViewerComponent ]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(FormControlViewerComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });