commons-shared-web-ui 0.0.50 → 0.0.51

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 (186) hide show
  1. package/fesm2022/commons-shared-web-ui.mjs +13828 -0
  2. package/fesm2022/commons-shared-web-ui.mjs.map +1 -0
  3. package/index.d.ts +4258 -0
  4. package/package.json +34 -53
  5. package/.claude/settings.local.json +0 -10
  6. package/documentation/alert.md +0 -123
  7. package/documentation/button-dropdown.md +0 -126
  8. package/documentation/button.md +0 -184
  9. package/documentation/cards-usage-guidelines.md +0 -131
  10. package/documentation/configurable-form.md +0 -605
  11. package/documentation/confirmation-modal.md +0 -250
  12. package/documentation/filter-sidebar.md +0 -178
  13. package/documentation/filter-table-selector.md +0 -228
  14. package/documentation/form-builder.md +0 -597
  15. package/documentation/form-components.md +0 -384
  16. package/documentation/nav.md +0 -427
  17. package/documentation/pagination.md +0 -181
  18. package/documentation/side-nav-documentation.md +0 -169
  19. package/documentation/smart-form.md +0 -2405
  20. package/documentation/smart-table.md +0 -1221
  21. package/documentation/snackbar.md +0 -118
  22. package/documentation/style-externalization.md +0 -88
  23. package/documentation/summary-card.md +0 -279
  24. package/ng-package.json +0 -28
  25. package/src/lib/modules/alert/alert.models.ts +0 -6
  26. package/src/lib/modules/alert/alert.module.ts +0 -16
  27. package/src/lib/modules/alert/components/alert/alert.component.html +0 -27
  28. package/src/lib/modules/alert/components/alert/alert.component.scss +0 -92
  29. package/src/lib/modules/alert/components/alert/alert.component.ts +0 -81
  30. package/src/lib/modules/button/button.models.ts +0 -13
  31. package/src/lib/modules/button/button.module.ts +0 -16
  32. package/src/lib/modules/button/components/button/button.component.html +0 -22
  33. package/src/lib/modules/button/components/button/button.component.scss +0 -88
  34. package/src/lib/modules/button/components/button/button.component.ts +0 -67
  35. package/src/lib/modules/button-dropdown/button-dropdown.models.ts +0 -26
  36. package/src/lib/modules/button-dropdown/button-dropdown.module.ts +0 -22
  37. package/src/lib/modules/button-dropdown/button-dropdown.theme.scss +0 -87
  38. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +0 -41
  39. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +0 -135
  40. package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +0 -160
  41. package/src/lib/modules/configurable-form/component/configurable-form.component.html +0 -294
  42. package/src/lib/modules/configurable-form/component/configurable-form.component.scss +0 -503
  43. package/src/lib/modules/configurable-form/component/configurable-form.component.ts +0 -628
  44. package/src/lib/modules/configurable-form/configurable-form.examples.ts +0 -154
  45. package/src/lib/modules/configurable-form/configurable-form.model.ts +0 -131
  46. package/src/lib/modules/configurable-form/configurable-form.module.ts +0 -19
  47. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +0 -77
  48. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +0 -395
  49. package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +0 -266
  50. package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +0 -71
  51. package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +0 -20
  52. package/src/lib/modules/filter/components/filter/filter.component.html +0 -131
  53. package/src/lib/modules/filter/components/filter/filter.component.scss +0 -245
  54. package/src/lib/modules/filter/components/filter/filter.component.ts +0 -216
  55. package/src/lib/modules/filter/filter.models.ts +0 -88
  56. package/src/lib/modules/filter/filter.module.ts +0 -24
  57. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +0 -112
  58. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +0 -186
  59. package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +0 -163
  60. package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +0 -95
  61. package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +0 -24
  62. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +0 -73
  63. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +0 -321
  64. package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +0 -361
  65. package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +0 -91
  66. package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +0 -22
  67. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +0 -63
  68. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +0 -496
  69. package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +0 -445
  70. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +0 -75
  71. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +0 -210
  72. package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +0 -55
  73. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +0 -25
  74. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +0 -82
  75. package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +0 -95
  76. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +0 -20
  77. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +0 -37
  78. package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +0 -94
  79. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +0 -46
  80. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +0 -102
  81. package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +0 -50
  82. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +0 -35
  83. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +0 -67
  84. package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +0 -34
  85. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +0 -68
  86. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +0 -113
  87. package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +0 -74
  88. package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +0 -533
  89. package/src/lib/modules/form-builder/form-builder.module.ts +0 -36
  90. package/src/lib/modules/form-builder/index.ts +0 -9
  91. package/src/lib/modules/form-builder/models/builder.models.ts +0 -7
  92. package/src/lib/modules/form-builder/models/field-configurator.models.ts +0 -38
  93. package/src/lib/modules/form-builder/models/field-selection.models.ts +0 -51
  94. package/src/lib/modules/form-builder/services/field-configurator.service.ts +0 -258
  95. package/src/lib/modules/form-builder/services/field-selection.service.ts +0 -299
  96. package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +0 -670
  97. package/src/lib/modules/form-builder/tokens/builder.tokens.ts +0 -10
  98. package/src/lib/modules/form-builder/utils/constants.ts +0 -43
  99. package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +0 -29
  100. package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +0 -111
  101. package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +0 -207
  102. package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +0 -35
  103. package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +0 -42
  104. package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +0 -115
  105. package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +0 -267
  106. package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +0 -45
  107. package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +0 -74
  108. package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +0 -252
  109. package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +0 -377
  110. package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +0 -53
  111. package/src/lib/modules/form-components/components/input/input.component.html +0 -51
  112. package/src/lib/modules/form-components/components/input/input.component.scss +0 -128
  113. package/src/lib/modules/form-components/components/input/input.component.ts +0 -250
  114. package/src/lib/modules/form-components/components/input/input.models.ts +0 -55
  115. package/src/lib/modules/form-components/components/radio/radio.component.html +0 -22
  116. package/src/lib/modules/form-components/components/radio/radio.component.scss +0 -107
  117. package/src/lib/modules/form-components/components/radio/radio.component.ts +0 -181
  118. package/src/lib/modules/form-components/components/radio/radio.models.ts +0 -39
  119. package/src/lib/modules/form-components/components/search/search.component.html +0 -15
  120. package/src/lib/modules/form-components/components/search/search.component.scss +0 -87
  121. package/src/lib/modules/form-components/components/search/search.component.ts +0 -213
  122. package/src/lib/modules/form-components/components/search/search.models.ts +0 -40
  123. package/src/lib/modules/form-components/components/toggle/toggle.component.html +0 -15
  124. package/src/lib/modules/form-components/components/toggle/toggle.component.scss +0 -81
  125. package/src/lib/modules/form-components/components/toggle/toggle.component.ts +0 -166
  126. package/src/lib/modules/form-components/components/toggle/toggle.models.ts +0 -27
  127. package/src/lib/modules/form-components/directives/click-outside.directive.ts +0 -22
  128. package/src/lib/modules/form-components/form-components.module.ts +0 -41
  129. package/src/lib/modules/material/material.module.ts +0 -94
  130. package/src/lib/modules/nav/components/nav/nav.component.html +0 -34
  131. package/src/lib/modules/nav/components/nav/nav.component.scss +0 -171
  132. package/src/lib/modules/nav/components/nav/nav.component.ts +0 -82
  133. package/src/lib/modules/nav/nav.models.ts +0 -31
  134. package/src/lib/modules/nav/nav.module.ts +0 -17
  135. package/src/lib/modules/pagination/components/pagination/pagination.component.html +0 -52
  136. package/src/lib/modules/pagination/components/pagination/pagination.component.scss +0 -155
  137. package/src/lib/modules/pagination/components/pagination/pagination.component.ts +0 -109
  138. package/src/lib/modules/pagination/pagination.module.ts +0 -17
  139. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +0 -56
  140. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +0 -342
  141. package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +0 -135
  142. package/src/lib/modules/side-nav/side-nav.models.ts +0 -38
  143. package/src/lib/modules/side-nav/side-nav.module.ts +0 -16
  144. package/src/lib/modules/smart-form/components/form-field/form-field.component.html +0 -1196
  145. package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +0 -2014
  146. package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +0 -2525
  147. package/src/lib/modules/smart-form/components/form-section/form-section.component.html +0 -65
  148. package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +0 -209
  149. package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +0 -131
  150. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +0 -253
  151. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +0 -689
  152. package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +0 -1124
  153. package/src/lib/modules/smart-form/index.ts +0 -10
  154. package/src/lib/modules/smart-form/models/form-schema.model.ts +0 -733
  155. package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +0 -21
  156. package/src/lib/modules/smart-form/services/expression.service.ts +0 -75
  157. package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +0 -65
  158. package/src/lib/modules/smart-form/smart-form.examples.ts +0 -1324
  159. package/src/lib/modules/smart-form/smart-form.module.ts +0 -36
  160. package/src/lib/modules/smart-form/utils/translation.utils.ts +0 -82
  161. package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +0 -25
  162. package/src/lib/modules/smart-form/utils/validation.utils.ts +0 -98
  163. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +0 -283
  164. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +0 -685
  165. package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +0 -1128
  166. package/src/lib/modules/smart-table/models/table-config.model.ts +0 -207
  167. package/src/lib/modules/smart-table/smart-table.module.ts +0 -30
  168. package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +0 -28
  169. package/src/lib/modules/smart-table/utils/smart-table.utils.ts +0 -18
  170. package/src/lib/modules/snackbar/components/snackbar.component.html +0 -41
  171. package/src/lib/modules/snackbar/components/snackbar.component.scss +0 -99
  172. package/src/lib/modules/snackbar/components/snackbar.component.ts +0 -18
  173. package/src/lib/modules/snackbar/models/snackbar.models.ts +0 -10
  174. package/src/lib/modules/snackbar/services/snackbar.service.ts +0 -40
  175. package/src/lib/modules/snackbar/snackbar.module.ts +0 -11
  176. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +0 -47
  177. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +0 -199
  178. package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +0 -126
  179. package/src/lib/modules/summary-card/summary-card.module.ts +0 -18
  180. package/src/lib/shared-ui.module.ts +0 -44
  181. package/src/lib/utils/constants.ts +0 -11
  182. package/src/lib/utils/storage.utils.ts +0 -37
  183. package/src/lib/utils/string.utils.ts +0 -23
  184. package/src/lib/utils/translation.utils.ts +0 -87
  185. package/src/public-api.ts +0 -104
  186. package/tsconfig.lib.json +0 -15
@@ -1,199 +0,0 @@
1
- :host {
2
- display: block;
3
- width: 100%;
4
- }
5
-
6
- .cc-summary-card {
7
- display: flex;
8
- flex-direction: row;
9
- align-items: stretch;
10
- box-sizing: border-box;
11
- font-family: var(--cc-sc-font-family, 'Inter', sans-serif);
12
- background-color: var(--cc-sc-bg-color, #ffffff);
13
- border-radius: var(--cc-sc-border-radius, 8px);
14
- border: var(--cc-sc-border, 1px solid #e0e0e0);
15
- padding: var(--cc-sc-padding, 16px);
16
- box-shadow: var(--cc-sc-shadow, 0 2px 4px rgba(0, 0, 0, 0.05));
17
- transition: all var(--cc-sc-transition-duration, 0.2s) ease;
18
- height: 100%;
19
- width: 100%;
20
- overflow: hidden;
21
- gap: var(--cc-sc-icon-margin, 1rem);
22
-
23
- &.clickable {
24
- cursor: pointer;
25
-
26
- &:hover {
27
- transform: var(--cc-sc-hover-transform);
28
- box-shadow: var(--cc-sc-hover-shadow);
29
- }
30
- }
31
-
32
- &.disabled {
33
- opacity: var(--cc-sc-disabled-opacity);
34
- cursor: not-allowed;
35
- pointer-events: none;
36
- }
37
-
38
- // Icon Section (Left Side)
39
- .icon-section {
40
- width: var(--cc-sc-icon-box-size);
41
- height: var(--cc-sc-icon-box-size);
42
- min-width: var(--cc-sc-icon-box-size);
43
- display: flex;
44
- align-items: center;
45
- justify-content: center;
46
- border-radius: var(--cc-sc-icon-radius);
47
- background-color: var(--cc-sc-icon-bg);
48
- color: var(--cc-sc-icon-color);
49
- flex-shrink: 0;
50
- align-self: center;
51
-
52
- mat-icon {
53
- width: var(--cc-sc-icon-size);
54
- height: var(--cc-sc-icon-size);
55
- font-size: var(--cc-sc-icon-size);
56
- line-height: var(--cc-sc-icon-size);
57
- }
58
-
59
- img {
60
- width: var(--cc-sc-icon-size);
61
- height: var(--cc-sc-icon-size);
62
- object-fit: contain;
63
- }
64
- }
65
-
66
- // Right Section (Header + Value/Meta)
67
- .right-section {
68
- display: flex;
69
- flex-direction: column;
70
- flex: 1;
71
- min-width: 0;
72
- gap: var(--cc-sc-content-gap, 0.5rem);
73
-
74
- .header {
75
- font-size: var(--cc-sc-header-size);
76
- font-weight: var(--cc-sc-header-weight);
77
- text-transform: var(--cc-sc-header-transform);
78
- color: var(--cc-sc-header-color);
79
- letter-spacing: var(--cc-sc-header-letter-spacing);
80
- line-height: var(--cc-sc-header-line-height);
81
- white-space: nowrap;
82
- overflow: hidden;
83
- text-overflow: ellipsis;
84
- width: 100%;
85
- }
86
-
87
- // Value and Meta Row
88
- .value-meta-row {
89
- display: flex;
90
- flex-direction: row;
91
- align-items: flex-start;
92
- justify-content: space-between;
93
- gap: 1rem;
94
- flex: 1;
95
-
96
- // Content Section
97
- .content-section {
98
- display: flex;
99
- flex-direction: column;
100
- justify-content: flex-start;
101
- flex: 1;
102
- min-width: 0;
103
-
104
- .value-row {
105
- display: flex;
106
- flex-direction: column;
107
- gap: var(--cc-sc-value-desc-gap);
108
-
109
- &.inline-layout {
110
- flex-direction: row;
111
- align-items: baseline;
112
- flex-wrap: wrap;
113
- }
114
-
115
- .value {
116
- font-size: var(--cc-sc-value-size);
117
- font-weight: var(--cc-sc-value-weight);
118
- color: var(--cc-sc-value-color);
119
- line-height: var(--cc-sc-value-line-height);
120
- white-space: nowrap;
121
-
122
- .value-subtext {
123
- font-size: var(--cc-sc-desc-size);
124
- font-weight: var(--cc-sc-desc-weight);
125
- color: var(--cc-sc-desc-color);
126
- margin-left: 4px;
127
- }
128
- }
129
-
130
- .description {
131
- font-size: var(--cc-sc-desc-size);
132
- font-weight: var(--cc-sc-desc-weight);
133
- color: var(--cc-sc-desc-color);
134
- line-height: var(--cc-sc-desc-line-height);
135
- }
136
- }
137
- }
138
-
139
- // Meta Section (Aligned with Value)
140
- .meta-section {
141
- display: flex;
142
- flex-direction: column;
143
- align-items: flex-end;
144
- justify-content: flex-start;
145
- flex-shrink: 0;
146
- gap: 6px;
147
-
148
- .meta-item {
149
- font-size: 0.8125rem; // ~13px
150
- line-height: 1.4;
151
- white-space: nowrap;
152
- text-align: right;
153
- flex-shrink: 0;
154
-
155
- &.meta-text {
156
- color: var(--cc-sc-desc-color, #64748b);
157
- font-weight: 500;
158
- }
159
-
160
- &.meta-pill {
161
- display: inline-flex;
162
- align-items: center;
163
- justify-content: center;
164
- padding: var(--cc-sc-meta-pill-padding, 4px 12px);
165
- border-radius: var(--cc-sc-meta-pill-radius, 20px);
166
- font-size: var(--cc-sc-meta-pill-font-size, 0.75rem);
167
- font-weight: var(--cc-sc-meta-pill-font-weight, 600);
168
- line-height: 1.2;
169
- background-color: var(--cc-sc-meta-pill-bg, #f1f5f9);
170
- color: var(--cc-sc-meta-pill-color, #475569);
171
- }
172
- }
173
- }
174
- }
175
- }
176
-
177
- // Responsive Design
178
- @media (max-width: 600px) {
179
- .icon-section {
180
- margin-right: var(--cc-sc-icon-margin-mobile, 0.75rem);
181
- }
182
-
183
- .content-section {
184
- .header {
185
- font-size: var(--cc-sc-header-size-mobile, 0.7rem);
186
- }
187
-
188
- .value-row {
189
- .value {
190
- font-size: var(--cc-sc-value-size-mobile, 1.25rem);
191
- }
192
-
193
- .description {
194
- font-size: var(--cc-sc-desc-size-mobile, 0.7rem);
195
- }
196
- }
197
- }
198
- }
199
- }
@@ -1,126 +0,0 @@
1
- import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core';
2
-
3
- export interface SummaryCardConfig {
4
- header: string;
5
- value: string;
6
- description?: string;
7
-
8
- // Icon or Image (mutually exclusive)
9
- icon?: string; // Material icon name
10
- iconImage?: string; // URL for image icon
11
-
12
- // Layout configurations
13
- descriptionPosition?: 'bottom' | 'inline'; // 'bottom' (default) or 'inline' (right side of value)
14
-
15
- // Extended Content
16
- valueSubtext?: string; // Text displayed next to the value (e.g. "/ 15 Target")
17
- metaData?: SummaryCardMeta[]; // Right-aligned meta information
18
-
19
- // Color configurations
20
- valueColor?: string; // Color for the value text
21
- headerColor?: string; // Color for the header text
22
- descriptionColor?: string; // Color for the description text
23
- iconColor?: string; // Color for the icon
24
- iconBackgroundColor?: string; // Background color for the icon container
25
-
26
- // Additional styling
27
- iconClass?: string; // Additional CSS classes for icon
28
- valueClass?: string; // Additional CSS classes for value
29
- headerClass?: string; // Additional CSS classes for header
30
- descriptionClass?: string; // Additional CSS classes for description
31
-
32
- // Interaction
33
- isDisabled?: boolean; // Disable click interaction
34
- isClickable?: boolean; // Whether card is clickable (default: true)
35
- }
36
-
37
- export interface SummaryCardMeta {
38
- text: string;
39
- type?: 'text' | 'pill'; // 'text' (default) or 'pill' (badge style)
40
- color?: string; // Text color
41
- backgroundColor?: string; // Background color for pill
42
- cssClass?: string; // Custom CSS class
43
- }
44
-
45
- export interface SummaryCardLabels {
46
- iconAlt: string;
47
- }
48
-
49
- @Component({
50
- selector: 'lib-summary-card',
51
- templateUrl: './summary-card.component.html',
52
- styleUrls: ['./summary-card.component.scss'],
53
- standalone: false
54
- })
55
- export class SummaryCardComponent {
56
- @Input() config!: SummaryCardConfig;
57
- @Input() theme?: 'theme-1' | 'theme-2';
58
- @Input() labels: any;
59
- @Output() cardClick = new EventEmitter<void>();
60
-
61
- constructor() { }
62
-
63
- onCardClick(): void {
64
- if (this.config?.isDisabled || this.config?.isClickable === false) {
65
- return;
66
- }
67
- this.cardClick.emit();
68
- }
69
-
70
- get cardClasses(): { [key: string]: boolean } {
71
- return {
72
- 'disabled': !!this.config?.isDisabled,
73
- 'clickable': this.config?.isClickable !== false && !this.config?.isDisabled
74
- };
75
- }
76
-
77
- get iconStyles(): { [key: string]: string } {
78
- const styles: { [key: string]: string } = {};
79
- if (this.config.iconBackgroundColor) {
80
- styles['backgroundColor'] = this.config.iconBackgroundColor;
81
- }
82
- if (this.config.iconColor) {
83
- styles['color'] = this.config.iconColor;
84
- }
85
- return styles;
86
- }
87
-
88
- get headerStyles(): { [key: string]: string } {
89
- const styles: { [key: string]: string } = {};
90
- if (this.config.headerColor) {
91
- styles['color'] = this.config.headerColor;
92
- }
93
- return styles;
94
- }
95
-
96
- get valueStyles(): { [key: string]: string } {
97
- const styles: { [key: string]: string } = {};
98
- if (this.config.valueColor) {
99
- styles['color'] = this.config.valueColor;
100
- }
101
- return styles;
102
- }
103
-
104
- get descriptionStyles(): { [key: string]: string } {
105
- const styles: { [key: string]: string } = {};
106
- if (this.config.descriptionColor) {
107
- styles['color'] = this.config.descriptionColor;
108
- }
109
- return styles;
110
- }
111
-
112
- get isDescriptionInline(): boolean {
113
- return this.config.descriptionPosition === 'inline';
114
- }
115
-
116
- getMetaStyles(meta: SummaryCardMeta): { [key: string]: string } {
117
- const styles: { [key: string]: string } = {};
118
- if (meta.color) {
119
- styles['color'] = meta.color;
120
- }
121
- if (meta.backgroundColor && meta.type === 'pill') {
122
- styles['backgroundColor'] = meta.backgroundColor;
123
- }
124
- return styles;
125
- }
126
- }
@@ -1,18 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { MatIconModule } from '@angular/material/icon';
4
- import { SummaryCardComponent } from './components/summary-card/summary-card.component';
5
-
6
- @NgModule({
7
- declarations: [
8
- SummaryCardComponent
9
- ],
10
- imports: [
11
- CommonModule,
12
- MatIconModule
13
- ],
14
- exports: [
15
- SummaryCardComponent
16
- ]
17
- })
18
- export class SummaryCardModule { }
@@ -1,44 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { MaterialModule } from './modules/material/material.module';
4
- import { AlertModule } from './modules/alert/alert.module';
5
- import { ButtonModule } from './modules/button/button.module';
6
- import { ButtonDropdownModule } from './modules/button-dropdown/button-dropdown.module';
7
- import { ConfirmationModalModule } from './modules/confirmation-modal/confirmation-modal.module';
8
- import { FilterSidebarModule } from './modules/filter-sidebar/filter-sidebar.module';
9
- import { SummaryCardModule } from './modules/summary-card/summary-card.module';
10
- import { ConfigurableFormModule } from './modules/configurable-form/configurable-form.module';
11
- import { FormComponentsModule } from './modules/form-components/form-components.module';
12
- import { SmartFormModule } from './modules/smart-form/smart-form.module';
13
- import { FilterModule } from './modules/filter/filter.module';
14
- import { SideNavModule } from './modules/side-nav/side-nav.module';
15
- import { FormBuilderModule } from './modules/form-builder/form-builder.module';
16
- import { FilterTableSelectorModule } from './modules/filter-table-selector/filter-table-selector.module';
17
-
18
- @NgModule({
19
- declarations: [],
20
- imports: [
21
- CommonModule,
22
- MaterialModule,
23
- AlertModule, ButtonModule, ButtonDropdownModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,
24
- SummaryCardModule,
25
- ConfigurableFormModule,
26
- FormComponentsModule,
27
- SmartFormModule,
28
- SideNavModule,
29
- FormBuilderModule,
30
- FilterTableSelectorModule
31
- ],
32
- exports: [
33
- MaterialModule,
34
- AlertModule, ButtonModule, ButtonDropdownModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,
35
- SummaryCardModule,
36
- ConfigurableFormModule,
37
- FormComponentsModule,
38
- SmartFormModule,
39
- SideNavModule,
40
- FormBuilderModule,
41
- FilterTableSelectorModule
42
- ],
43
- })
44
- export class SharedUiModule { }
@@ -1,11 +0,0 @@
1
- export const DEFAULT_ITEMS_PER_PAGE = 10;
2
- export const DEFAULT_PAGE_SIZE_OPTIONS = [5, 10, 20, 50, 100];
3
- export const PAGINATION_THEME_DEFAULT = 'theme-1';
4
- export const PAGINATION_THEME_DARK = 'theme-2';
5
-
6
- // Nav
7
- export const NAV_VARIANT_DEFAULT: 'filled' | 'underline' | 'pills' = 'filled';
8
- export const NAV_ORIENTATION_DEFAULT: 'horizontal' | 'vertical' = 'horizontal';
9
-
10
- // Side Nav
11
- export const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = 'right';
@@ -1,37 +0,0 @@
1
- /**
2
- * Utility functions for LocalStorage operations
3
- */
4
- export const getLocalStorageItem = (key: string): string | null => {
5
- return localStorage.getItem(key);
6
- };
7
-
8
- export const setLocalStorageItem = (key: string, value: string): void => {
9
- localStorage.setItem(key, value);
10
- };
11
-
12
- export const removeLocalStorageItem = (key: string): void => {
13
- localStorage.removeItem(key);
14
- };
15
-
16
- export const clearLocalStorage = (): void => {
17
- localStorage.clear();
18
- };
19
-
20
- /**
21
- * Utility functions for SessionStorage operations
22
- */
23
- export const getSessionStorageItem = (key: string): string | null => {
24
- return sessionStorage.getItem(key);
25
- };
26
-
27
- export const setSessionStorageItem = (key: string, value: string): void => {
28
- sessionStorage.setItem(key, value);
29
- };
30
-
31
- export const removeSessionStorageItem = (key: string): void => {
32
- sessionStorage.removeItem(key);
33
- };
34
-
35
- export const clearSessionStorage = (): void => {
36
- sessionStorage.clear();
37
- };
@@ -1,23 +0,0 @@
1
- /**
2
- * Utility functions for string manipulation
3
- */
4
- export class StringUtils {
5
-
6
- /**
7
- * Converts a string to camelCase.
8
- * Example: "First Name" -> "firstName", "Profile Picture" -> "profilePicture"
9
- */
10
- static toCamelCase(str?: string): string {
11
- if (!str) return '';
12
- return str
13
- .replace(/[^a-zA-Z0-9 ]/g, '')
14
- .split(' ')
15
- .filter(Boolean)
16
- .map((word, i) =>
17
- i === 0
18
- ? word.charAt(0).toLowerCase() + word.slice(1)
19
- : word.charAt(0).toUpperCase() + word.slice(1)
20
- )
21
- .join('');
22
- }
23
- }
@@ -1,87 +0,0 @@
1
-
2
- /**
3
- * Recursively translates the Configuration object using the provided labels map.
4
- * This function processes:
5
- * - Section Titles
6
- * - Field Labels
7
- * - Placeholders
8
- * - Help Texts
9
- * - Option Labels (for static options)
10
- * - Repeater Labels (addLabel, repeaterItemLabel)
11
- *
12
- * @param config The FormConfig object to translate
13
- * @param labelsMap A map of key-value pairs for translation (Flattened JSON)
14
- * @returns A new FormConfig object with translated strings
15
- */
16
- export function translateConfig(config: any, labelsMap: any): any {
17
- if (!config || !labelsMap) {
18
- return config;
19
- }
20
-
21
- // Deep clone to avoid mutating original config, if not already cloned
22
- // Note: Assuming config passed here is already a clone to be modified or we clone it.
23
- // To be safe, let's clone it if it's the root call, but this function is helper.
24
- // In component we do: processedConfig = JSON.parse(JSON.stringify(config)); -> translateConfig(processedConfig, map)
25
- // So distinct reference is passed.
26
-
27
- // Helper to translate a single key
28
- const t = (key: string) => {
29
- return labelsMap[key] || key;
30
- };
31
-
32
- if (config.sections) {
33
- config.sections.forEach((section: any) => {
34
- if (section.sectionTitle) {
35
- section.sectionTitle = t(section.sectionTitle);
36
- }
37
- if (section.repeaterItemLabel) {
38
- section.repeaterItemLabel = t(section.repeaterItemLabel);
39
- }
40
- if (section.addLabel) {
41
- section.addLabel = t(section.addLabel);
42
- }
43
-
44
- if (section.fields) {
45
- section.fields.forEach((field: any) => {
46
- translateField(field, t);
47
- });
48
- }
49
- });
50
- }
51
-
52
- return config;
53
- }
54
-
55
- function translateField(field: any, t: (key: string) => string) {
56
- if (field.label) {
57
- field.label = t(field.label);
58
- }
59
- if (field.placeholder) {
60
- field.placeholder = t(field.placeholder);
61
- }
62
- if (field.helpText) {
63
- field.helpText = t(field.helpText);
64
- }
65
- if (field.suffixText) {
66
- field.suffixText = t(field.suffixText);
67
- }
68
- if (field.prefixText) { // Assuming prefixText might exist or be added
69
- field.prefixText = t(field.prefixText);
70
- }
71
-
72
- // Translate options if they exist
73
- if (field.options) {
74
- field.options.forEach((opt: any) => {
75
- if (opt.label) {
76
- opt.label = t(opt.label);
77
- }
78
- });
79
- }
80
-
81
- // Handle subFields for composite type
82
- if (field.subFields) {
83
- field.subFields.forEach((sub: any) => {
84
- translateField(sub, t);
85
- });
86
- }
87
- }
package/src/public-api.ts DELETED
@@ -1,104 +0,0 @@
1
- /*
2
- * Public API Surface of commons-shared-web-ui
3
- */
4
-
5
- export * from './lib/modules/form-builder/form-builder.module';
6
- export * from './lib/modules/form-builder/components/field-selection/field-selection.component';
7
- export * from './lib/modules/form-builder/components/field-configurator/field-configurator.component';
8
- export * from './lib/shared-ui.module';
9
- export * from './lib/modules/material/material.module';
10
- export * from './lib/utils/storage.utils';
11
- export * from './lib/utils/string.utils';
12
- export * from './lib/utils/translation.utils';
13
- export * from './lib/modules/summary-card/summary-card.module';
14
- export * from './lib/modules/summary-card/components/summary-card/summary-card.component';
15
- export * from './lib/modules/configurable-form/configurable-form.module';
16
- export * from './lib/modules/configurable-form/component/configurable-form.component';
17
- // Export Configurable Form resources namespaced to avoid collisions
18
- export * from './lib/modules/configurable-form/configurable-form.model';
19
- export * as ConfigurableFormExamples from './lib/modules/configurable-form/configurable-form.examples';
20
-
21
- export * from './lib/modules/pagination/pagination.module';
22
- export * from './lib/modules/pagination/components/pagination/pagination.component';
23
- export * from './lib/modules/nav/nav.module';
24
- export * from './lib/modules/nav/components/nav/nav.component';
25
- export * from './lib/modules/nav/nav.models';
26
- export * from './lib/modules/side-nav/side-nav.module';
27
- export * from './lib/modules/side-nav/components/side-nav/side-nav.component';
28
- export * from './lib/modules/side-nav/side-nav.models';
29
- export * from './lib/utils/constants';
30
- export * from './lib/modules/alert/alert.module';
31
- export * from './lib/modules/alert/alert.models';
32
- export * from './lib/modules/alert/components/alert/alert.component';
33
- export * from './lib/modules/button/button.module';
34
- export * from './lib/modules/button/button.models';
35
- export * from './lib/modules/button/components/button/button.component';
36
- export * from './lib/modules/button-dropdown/button-dropdown.module';
37
- export * from './lib/modules/button-dropdown/button-dropdown.models';
38
- export * from './lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component';
39
- export * from './lib/modules/confirmation-modal/confirmation-modal.module';
40
- export * from './lib/modules/confirmation-modal/confirmation-modal.models';
41
- export * from './lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component';
42
- export * from './lib/modules/filter-sidebar/filter-sidebar.module';
43
- export * from './lib/modules/filter-sidebar/filter-sidebar.models';
44
- export * from './lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component';
45
- export * from './lib/modules/filter/filter.module';
46
- export * from './lib/modules/filter/filter.models';
47
- export * from './lib/modules/filter/components/filter/filter.component';
48
- export * from './lib/modules/form-components/form-components.module';
49
- export * from './lib/modules/form-components/components/input/input.component';
50
- export * from './lib/modules/form-components/components/input/input.models';
51
- export * from './lib/modules/form-components/components/dropdown/dropdown.component';
52
- export * from './lib/modules/form-components/components/dropdown/dropdown.models';
53
- export * from './lib/modules/form-components/components/checkbox/checkbox.component';
54
- export * from './lib/modules/form-components/components/checkbox/checkbox.models';
55
- export * from './lib/modules/form-components/components/radio/radio.component';
56
- export * from './lib/modules/form-components/components/radio/radio.models';
57
- export * from './lib/modules/form-components/components/toggle/toggle.component';
58
- export * from './lib/modules/form-components/components/toggle/toggle.models';
59
- export * from './lib/modules/form-components/components/datepicker/datepicker.component';
60
- export * from './lib/modules/form-components/components/datepicker/datepicker.models';
61
- export * from './lib/modules/form-components/components/search/search.component';
62
- export * from './lib/modules/form-components/components/search/search.models';
63
- export * from './lib/modules/smart-table/smart-table.module';
64
- export * from './lib/modules/smart-table/components/smart-table/smart-table.component';
65
- export * from './lib/modules/smart-table/models/table-config.model';
66
- export * from './lib/modules/smart-table/utils/smart-table.utils';
67
- export * from './lib/modules/smart-form/smart-form.module';
68
- export * from './lib/modules/smart-form/components/smart-form/smart-form.component';
69
- export {
70
- FormSchema,
71
- SubmitConfig,
72
- FieldConfig,
73
- SectionConfig,
74
- StepperConfig,
75
- TextConfig,
76
- NumberConfig,
77
- DateConfig,
78
- EmailConfig,
79
- PhoneConfig,
80
- GeneratedConfig,
81
- RangeConfig,
82
- AttachmentConfig,
83
- LocationConfig,
84
- RatingConfig,
85
- ValidationResult,
86
- LengthConstraint,
87
- OptionItem,
88
- SuffixActionIcon
89
- } from './lib/modules/smart-form/models/form-schema.model';
90
- export * from './lib/modules/smart-form/models/hierarchy-config.model';
91
- export * from './lib/modules/smart-form/services/expression.service';
92
- export * from './lib/modules/smart-form/services/smart-form-controller.service';
93
- export * from './lib/modules/smart-form/utils/validation.utils';
94
- export * as SmartFormExamples from './lib/modules/smart-form/smart-form.examples';
95
-
96
- export * from './lib/modules/snackbar/snackbar.module';
97
- export * from './lib/modules/snackbar/components/snackbar.component';
98
- export * from './lib/modules/snackbar/models/snackbar.models';
99
- export * from './lib/modules/snackbar/services/snackbar.service';
100
-
101
- // ── FilterTableSelector ─────────────────────────────────────────────────────
102
- export * from './lib/modules/filter-table-selector/filter-table-selector.module';
103
- export * from './lib/modules/filter-table-selector/filter-table-selector.models';
104
- export * from './lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component';
package/tsconfig.lib.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/lib",
5
- "target": "es2022",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "inlineSources": true,
9
- "types": []
10
- },
11
- "exclude": [
12
- "src/test.ts",
13
- "**/*.spec.ts"
14
- ]
15
- }