coer-elements 0.0.21 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. package/esm2022/coer-elements.mjs +2 -2
  2. package/esm2022/index.mjs +2 -0
  3. package/fesm2022/coer-elements.mjs +0 -4081
  4. package/fesm2022/coer-elements.mjs.map +1 -1
  5. package/index.d.ts +1 -5
  6. package/package.json +1 -1
  7. package/styles/angular-material.scss +8 -11
  8. package/styles/bootstrap.scss +3 -3
  9. package/components/index.d.ts +0 -16
  10. package/components/lib/coer-alert/coer-alert.component.d.ts +0 -23
  11. package/components/lib/coer-button/coer-button.component.d.ts +0 -44
  12. package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +0 -28
  13. package/components/lib/coer-filebox/coer-filebox.component.d.ts +0 -33
  14. package/components/lib/coer-form/coer-form.component.d.ts +0 -33
  15. package/components/lib/coer-grid/coer-grid.component.d.ts +0 -53
  16. package/components/lib/coer-grid/coer-grid.extension.d.ts +0 -105
  17. package/components/lib/coer-grid/coer-grid.templates.d.ts +0 -9
  18. package/components/lib/coer-modal/coer-modal.component.d.ts +0 -38
  19. package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +0 -56
  20. package/components/lib/coer-page-title/coer-page-title.component.d.ts +0 -12
  21. package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +0 -75
  22. package/components/lib/coer-switch/coer-switch.component.d.ts +0 -31
  23. package/components/lib/coer-tab/coer-tab.component.d.ts +0 -35
  24. package/components/lib/coer-textarea/coer-textarea.component.d.ts +0 -51
  25. package/components/lib/coer-textbox/coer-textbox.component.d.ts +0 -57
  26. package/components/lib/components.module.d.ts +0 -31
  27. package/directives/index.d.ts +0 -3
  28. package/directives/lib/coer-ref.directive.d.ts +0 -14
  29. package/directives/lib/directives.module.d.ts +0 -8
  30. package/directives/lib/life-cycle.directive.d.ts +0 -16
  31. package/esm2022/components/index.mjs +0 -17
  32. package/esm2022/components/lib/coer-alert/coer-alert.component.mjs +0 -227
  33. package/esm2022/components/lib/coer-button/coer-button.component.mjs +0 -133
  34. package/esm2022/components/lib/coer-checkbox/coer-checkbox.component.mjs +0 -84
  35. package/esm2022/components/lib/coer-filebox/coer-filebox.component.mjs +0 -104
  36. package/esm2022/components/lib/coer-form/coer-form.component.mjs +0 -102
  37. package/esm2022/components/lib/coer-grid/coer-grid.component.mjs +0 -515
  38. package/esm2022/components/lib/coer-grid/coer-grid.extension.mjs +0 -412
  39. package/esm2022/components/lib/coer-grid/coer-grid.templates.mjs +0 -30
  40. package/esm2022/components/lib/coer-modal/coer-modal.component.mjs +0 -108
  41. package/esm2022/components/lib/coer-numberbox/coer-numberbox.component.mjs +0 -260
  42. package/esm2022/components/lib/coer-page-title/coer-page-title.component.mjs +0 -44
  43. package/esm2022/components/lib/coer-selectbox/coer-selectbox.component.mjs +0 -339
  44. package/esm2022/components/lib/coer-switch/coer-switch.component.mjs +0 -94
  45. package/esm2022/components/lib/coer-tab/coer-tab.component.mjs +0 -116
  46. package/esm2022/components/lib/coer-textarea/coer-textarea.component.mjs +0 -157
  47. package/esm2022/components/lib/coer-textbox/coer-textbox.component.mjs +0 -196
  48. package/esm2022/components/lib/components.module.mjs +0 -134
  49. package/esm2022/directives/index.mjs +0 -4
  50. package/esm2022/directives/lib/coer-ref.directive.mjs +0 -23
  51. package/esm2022/directives/lib/directives.module.mjs +0 -25
  52. package/esm2022/directives/lib/life-cycle.directive.mjs +0 -33
  53. package/esm2022/interfaces/index.mjs +0 -39
  54. package/esm2022/interfaces/lib/app-source.interface.mjs +0 -2
  55. package/esm2022/interfaces/lib/coer-filebox/file-image.interface.mjs +0 -2
  56. package/esm2022/interfaces/lib/coer-filebox/file.interface.mjs +0 -2
  57. package/esm2022/interfaces/lib/coer-grid/grid-button-by-row.interface.mjs +0 -2
  58. package/esm2022/interfaces/lib/coer-grid/grid-checkbox.interface.mjs +0 -2
  59. package/esm2022/interfaces/lib/coer-grid/grid-coer-numberbox.interface.mjs +0 -2
  60. package/esm2022/interfaces/lib/coer-grid/grid-coer-selectbox.interface.mjs +0 -2
  61. package/esm2022/interfaces/lib/coer-grid/grid-coer-switch.interface.mjs +0 -2
  62. package/esm2022/interfaces/lib/coer-grid/grid-coer-textbox.interface.mjs +0 -2
  63. package/esm2022/interfaces/lib/coer-grid/grid-column.interface.mjs +0 -2
  64. package/esm2022/interfaces/lib/coer-grid/grid-data-source.interface.mjs +0 -2
  65. package/esm2022/interfaces/lib/coer-grid/grid-header-button.interface.mjs +0 -2
  66. package/esm2022/interfaces/lib/coer-grid/grid-header-export-button.interface.mjs +0 -2
  67. package/esm2022/interfaces/lib/coer-grid/grid-header.interface.mjs +0 -2
  68. package/esm2022/interfaces/lib/coer-grid/grid-import.interface.mjs +0 -2
  69. package/esm2022/interfaces/lib/coer-grid/grid-input-checkbox.interface.mjs +0 -2
  70. package/esm2022/interfaces/lib/coer-grid/grid-input-switch-change.interface.mjs +0 -2
  71. package/esm2022/interfaces/lib/coer-grid/grid-input-textbox.interface.mjs +0 -2
  72. package/esm2022/interfaces/lib/coer-grid/grid-item.interface.mjs +0 -2
  73. package/esm2022/interfaces/lib/coer-grid/grid-keyup-enter.interface.mjs +0 -2
  74. package/esm2022/interfaces/lib/coer-grid/grid-length.interface.mjs +0 -2
  75. package/esm2022/interfaces/lib/coer-grid/grid-search.interface.mjs +0 -2
  76. package/esm2022/interfaces/lib/coer-grid/grid-sort.interface.mjs +0 -2
  77. package/esm2022/interfaces/lib/coer-menu/menu-option-selected.interface.mjs +0 -2
  78. package/esm2022/interfaces/lib/coer-menu/menu-selected.interface.mjs +0 -2
  79. package/esm2022/interfaces/lib/coer-menu/menu.interface.mjs +0 -2
  80. package/esm2022/interfaces/lib/coer-ref.interface.mjs +0 -2
  81. package/esm2022/interfaces/lib/page-title/breadcrumb.interface.mjs +0 -2
  82. package/esm2022/interfaces/lib/page-title/go-back.interface.mjs +0 -2
  83. package/esm2022/interfaces/lib/screen-size.interface.mjs +0 -2
  84. package/esm2022/interfaces/lib/service/http-request.interface.mjs +0 -2
  85. package/esm2022/interfaces/lib/service/http-response.interface.mjs +0 -2
  86. package/esm2022/interfaces/lib/service/patch.interface.mjs +0 -2
  87. package/esm2022/pipes/index.mjs +0 -5
  88. package/esm2022/pipes/lib/html.pipe.mjs +0 -18
  89. package/esm2022/pipes/lib/no-image.pipe.mjs +0 -23
  90. package/esm2022/pipes/lib/numeric-format.pipe.mjs +0 -15
  91. package/esm2022/pipes/lib/pipes.module.mjs +0 -31
  92. package/esm2022/public_api.mjs +0 -6
  93. package/esm2022/signals/index.mjs +0 -6
  94. package/esm2022/signals/lib/breakpoint.signal.mjs +0 -4
  95. package/esm2022/signals/lib/is-loading.signal.mjs +0 -3
  96. package/esm2022/signals/lib/is-menu-open.signal.mjs +0 -3
  97. package/esm2022/signals/lib/is-modal-open.signal.mjs +0 -3
  98. package/esm2022/signals/lib/menu.signal.mjs +0 -3
  99. package/esm2022/tools/index.mjs +0 -11
  100. package/esm2022/tools/lib/breadcrumbs.class.mjs +0 -63
  101. package/esm2022/tools/lib/control-value.class.mjs +0 -46
  102. package/esm2022/tools/lib/date-time.class.mjs +0 -29
  103. package/esm2022/tools/lib/files.class.mjs +0 -91
  104. package/esm2022/tools/lib/menu.class.mjs +0 -23
  105. package/esm2022/tools/lib/page.class.mjs +0 -156
  106. package/esm2022/tools/lib/screen.class.mjs +0 -51
  107. package/esm2022/tools/lib/service.class.mjs +0 -248
  108. package/esm2022/tools/lib/source.class.mjs +0 -80
  109. package/esm2022/tools/lib/tools.mjs +0 -220
  110. package/interfaces/index.d.ts +0 -33
  111. package/interfaces/lib/app-source.interface.d.ts +0 -4
  112. package/interfaces/lib/coer-filebox/file-image.interface.d.ts +0 -14
  113. package/interfaces/lib/coer-filebox/file.interface.d.ts +0 -5
  114. package/interfaces/lib/coer-grid/grid-button-by-row.interface.d.ts +0 -6
  115. package/interfaces/lib/coer-grid/grid-checkbox.interface.d.ts +0 -5
  116. package/interfaces/lib/coer-grid/grid-coer-numberbox.interface.d.ts +0 -12
  117. package/interfaces/lib/coer-grid/grid-coer-selectbox.interface.d.ts +0 -9
  118. package/interfaces/lib/coer-grid/grid-coer-switch.interface.d.ts +0 -6
  119. package/interfaces/lib/coer-grid/grid-coer-textbox.interface.d.ts +0 -11
  120. package/interfaces/lib/coer-grid/grid-column.interface.d.ts +0 -22
  121. package/interfaces/lib/coer-grid/grid-data-source.interface.d.ts +0 -6
  122. package/interfaces/lib/coer-grid/grid-header-button.interface.d.ts +0 -8
  123. package/interfaces/lib/coer-grid/grid-header-export-button.interface.d.ts +0 -10
  124. package/interfaces/lib/coer-grid/grid-header.interface.d.ts +0 -5
  125. package/interfaces/lib/coer-grid/grid-import.interface.d.ts +0 -4
  126. package/interfaces/lib/coer-grid/grid-input-checkbox.interface.d.ts +0 -5
  127. package/interfaces/lib/coer-grid/grid-input-switch-change.interface.d.ts +0 -5
  128. package/interfaces/lib/coer-grid/grid-input-textbox.interface.d.ts +0 -5
  129. package/interfaces/lib/coer-grid/grid-item.interface.d.ts +0 -5
  130. package/interfaces/lib/coer-grid/grid-keyup-enter.interface.d.ts +0 -6
  131. package/interfaces/lib/coer-grid/grid-length.interface.d.ts +0 -5
  132. package/interfaces/lib/coer-grid/grid-search.interface.d.ts +0 -4
  133. package/interfaces/lib/coer-grid/grid-sort.interface.d.ts +0 -5
  134. package/interfaces/lib/coer-menu/menu-option-selected.interface.d.ts +0 -9
  135. package/interfaces/lib/coer-menu/menu-selected.interface.d.ts +0 -10
  136. package/interfaces/lib/coer-menu/menu.interface.d.ts +0 -6
  137. package/interfaces/lib/coer-ref.interface.d.ts +0 -10
  138. package/interfaces/lib/page-title/breadcrumb.interface.d.ts +0 -6
  139. package/interfaces/lib/page-title/go-back.interface.d.ts +0 -6
  140. package/interfaces/lib/screen-size.interface.d.ts +0 -5
  141. package/interfaces/lib/service/http-request.interface.d.ts +0 -10
  142. package/interfaces/lib/service/http-response.interface.d.ts +0 -6
  143. package/interfaces/lib/service/patch.interface.d.ts +0 -5
  144. package/pipes/index.d.ts +0 -4
  145. package/pipes/lib/html.pipe.d.ts +0 -10
  146. package/pipes/lib/no-image.pipe.d.ts +0 -7
  147. package/pipes/lib/numeric-format.pipe.d.ts +0 -7
  148. package/pipes/lib/pipes.module.d.ts +0 -9
  149. package/public_api.d.ts +0 -1
  150. package/signals/index.d.ts +0 -5
  151. package/signals/lib/breakpoint.signal.d.ts +0 -1
  152. package/signals/lib/is-loading.signal.d.ts +0 -1
  153. package/signals/lib/is-menu-open.signal.d.ts +0 -1
  154. package/signals/lib/is-modal-open.signal.d.ts +0 -1
  155. package/signals/lib/menu.signal.d.ts +0 -2
  156. package/tools/index.d.ts +0 -10
  157. package/tools/lib/breadcrumbs.class.d.ts +0 -18
  158. package/tools/lib/control-value.class.d.ts +0 -25
  159. package/tools/lib/date-time.class.d.ts +0 -13
  160. package/tools/lib/files.class.d.ts +0 -16
  161. package/tools/lib/menu.class.d.ts +0 -8
  162. package/tools/lib/page.class.d.ts +0 -60
  163. package/tools/lib/screen.class.d.ts +0 -13
  164. package/tools/lib/service.class.d.ts +0 -39
  165. package/tools/lib/source.class.d.ts +0 -20
  166. package/tools/lib/tools.d.ts +0 -34
@@ -1,102 +0,0 @@
1
- import { Component, inject, input } from '@angular/core';
2
- import { CoerAlert } from '../../lib/coer-alert/coer-alert.component';
3
- import { Tools } from '../../../tools/lib/tools';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/forms";
6
- export class CoerForm {
7
- constructor() {
8
- //Injection
9
- this.alert = inject(CoerAlert);
10
- this.formGroup = input.required();
11
- this.isLoading = input(false);
12
- this.isDisabled = input(false);
13
- /** */
14
- this.IsInvalidControl = (formControlName) => {
15
- return Tools.IsNotNull(this.formGroup().get(formControlName))
16
- ? (this.formGroup().get(formControlName).touched && this.formGroup().get(formControlName).invalid)
17
- : true;
18
- };
19
- }
20
- get _isDisabled() {
21
- return this.isLoading() || this.isDisabled();
22
- }
23
- /** */
24
- TouchForm() {
25
- this.formGroup().markAllAsTouched();
26
- }
27
- /** */
28
- SetControlValue(formControlName, value) {
29
- if (Tools.IsNotNull(this.formGroup().get(formControlName))) {
30
- this.formGroup().get(formControlName).setValue(value);
31
- }
32
- else {
33
- this.alert.Warning(`${formControlName} Control`, 'Not Found');
34
- }
35
- }
36
- /** */
37
- GetControlValue(formControlName) {
38
- return Tools.IsNotNull(this.formGroup().get(formControlName))
39
- ? this.formGroup().get(formControlName).value
40
- : null;
41
- }
42
- /** Get form value */
43
- GetValue() {
44
- return Tools.BreakReference(this.formGroup().value);
45
- }
46
- /** */
47
- Reset(properties = null) {
48
- if (Tools.IsNull(properties))
49
- this.formGroup().reset();
50
- else
51
- this.formGroup().reset(properties);
52
- }
53
- /**
54
- * Mark all controls as touched.
55
- * If form is invalid emit a warning and focus first invalid control.
56
- */
57
- IsValid() {
58
- this.TouchForm();
59
- if (this.formGroup().invalid) {
60
- this.alert.Warning('Please complete the required fields', 'Instructions', 'fa-solid fa-list-check');
61
- this.Focus();
62
- }
63
- return {
64
- isValid: this.formGroup().valid,
65
- formValue: this.GetValue()
66
- };
67
- }
68
- /** Focus the especified control or first invalid control */
69
- Focus(formControl = null) {
70
- const formControlCollection = new Map();
71
- const formControlErrorCollection = new Map();
72
- for (const property of Tools.GetObjectProperties(this.formGroup().controls)) {
73
- formControlErrorCollection.set(property, this.formGroup().controls[property].errors);
74
- const htmlElement = document.querySelector(`[formcontrolname='${property}'] input`);
75
- if (Tools.IsNotNull(htmlElement))
76
- formControlCollection.set(property, htmlElement);
77
- }
78
- if (formControlCollection.size > 0) {
79
- if (Tools.IsNull(formControl)) {
80
- for (const [property, error] of formControlErrorCollection) {
81
- if (Tools.IsNotNull(error)) {
82
- formControl = property;
83
- break;
84
- }
85
- }
86
- if (Tools.IsNull(formControl)) {
87
- formControl = Array.from(formControlCollection.keys())[0];
88
- }
89
- }
90
- const element = formControlCollection.get(formControl);
91
- if (Tools.IsNotNull(element))
92
- element.focus();
93
- }
94
- }
95
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerForm, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
96
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: CoerForm, selector: "coer-form", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\" autocomplete=\"off\" class=\"coer-form\">\r\n <fieldset [disabled]=\"_isDisabled\">\r\n <ng-content></ng-content>\r\n </fieldset>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] }); }
97
- }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CoerForm, decorators: [{
99
- type: Component,
100
- args: [{ selector: 'coer-form', template: "<form [formGroup]=\"formGroup()\" autocomplete=\"off\" class=\"coer-form\">\r\n <fieldset [disabled]=\"_isDisabled\">\r\n <ng-content></ng-content>\r\n </fieldset>\r\n</form>" }]
101
- }] });
102
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29lci1mb3JtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvc3JjL2NvbXBvbmVudHMvb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9wZXJ0aWVzKHRoaXMuZm9ybUdyb3VwKCkuY29udHJvbHMpKSB7XHJcbiAgICAgICAgICAgIGZvcm1Db250cm9sRXJyb3JDb2xsZWN0aW9uLnNldChwcm9wZXJ0eSwgdGhpcy5mb3JtR3JvdXAoKS5jb250cm9sc1twcm9wZXJ0eV0uZXJyb3JzKTtcclxuICAgICAgICAgICAgY29uc3QgaHRtbEVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGBbZm9ybWNvbnRyb2xuYW1lPScke3Byb3BlcnR5fSddIGlucHV0YClcclxuICAgICAgICAgICAgaWYoVG9vbHMuSXNOb3ROdWxsKGh0bWxFbGVtZW50KSkgZm9ybUNvbnRyb2xDb2xsZWN0aW9uLnNldChwcm9wZXJ0eSwgaHRtbEVsZW1lbnQhKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmKGZvcm1Db250cm9sQ29sbGVjdGlvbi5zaXplID4gMCkge1xyXG4gICAgICAgICAgICBpZihUb29scy5Jc051bGwoZm9ybUNvbnRyb2wpKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IoY29uc3QgW3Byb3BlcnR5LCBlcnJvcl0gb2YgZm9ybUNvbnRyb2xFcnJvckNvbGxlY3Rpb24pIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoVG9vbHMuSXNOb3ROdWxsKGVycm9yKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtQ29udHJvbCA9IHByb3BlcnR5O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYoVG9vbHMuSXNOdWxsKGZvcm1Db250cm9sKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcm1Db250cm9sID0gQXJyYXkuZnJvbShmb3JtQ29udHJvbENvbGxlY3Rpb24ua2V5cygpKVswXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgY29uc3QgZWxlbWVudDogYW55ID0gZm9ybUNvbnRyb2xDb2xsZWN0aW9uLmdldChmb3JtQ29udHJvbCEpO1xyXG4gICAgICAgICAgICBpZihUb29scy5Jc05vdE51bGwoZWxlbWVudCkpIGVsZW1lbnQuZm9jdXMoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iLCI8Zm9ybSBbZm9ybUdyb3VwXT1cImZvcm1Hcm91cCgpXCIgYXV0b2NvbXBsZXRlPVwib2ZmXCIgY2xhc3M9XCJjb2VyLWZvcm1cIj5cclxuICAgIDxmaWVsZHNldCBbZGlzYWJsZWRdPVwiX2lzRGlzYWJsZWRcIj5cclxuICAgICAgICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XHJcbiAgICA8L2ZpZWxkc2V0PlxyXG48L2Zvcm0+Il19