commons-shared-web-ui 0.0.54 → 0.0.55
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.
- package/.claude/settings.local.json +10 -0
- package/documentation/alert.md +123 -0
- package/documentation/button-dropdown.md +126 -0
- package/documentation/button.md +184 -0
- package/documentation/cards-usage-guidelines.md +131 -0
- package/documentation/configurable-form.md +605 -0
- package/documentation/confirmation-modal.md +250 -0
- package/documentation/filter-sidebar.md +178 -0
- package/documentation/filter-table-selector.md +228 -0
- package/documentation/form-builder.md +599 -0
- package/documentation/form-components.md +384 -0
- package/documentation/form-field-configuration.md +250 -0
- package/documentation/nav.md +427 -0
- package/documentation/pagination.md +181 -0
- package/documentation/side-nav-documentation.md +169 -0
- package/documentation/smart-form.md +2765 -0
- package/documentation/smart-table.md +1221 -0
- package/documentation/snackbar.md +118 -0
- package/documentation/style-externalization.md +88 -0
- package/documentation/summary-card.md +279 -0
- package/documentation/table-column-configuration.md +221 -0
- package/documentation/time-picker.md +274 -0
- package/ng-package.json +30 -0
- package/package.json +53 -34
- package/src/lib/modules/alert/alert.models.ts +6 -0
- package/src/lib/modules/alert/alert.module.ts +16 -0
- package/src/lib/modules/alert/components/alert/alert.component.html +27 -0
- package/src/lib/modules/alert/components/alert/alert.component.scss +92 -0
- package/src/lib/modules/alert/components/alert/alert.component.ts +81 -0
- package/src/lib/modules/button/button.models.ts +13 -0
- package/src/lib/modules/button/button.module.ts +16 -0
- package/src/lib/modules/button/components/button/button.component.html +22 -0
- package/src/lib/modules/button/components/button/button.component.scss +88 -0
- package/src/lib/modules/button/components/button/button.component.ts +67 -0
- package/src/lib/modules/button-dropdown/button-dropdown.models.ts +26 -0
- package/src/lib/modules/button-dropdown/button-dropdown.module.ts +22 -0
- package/src/lib/modules/button-dropdown/button-dropdown.theme.scss +87 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +41 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +135 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +160 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.html +294 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.scss +503 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.ts +628 -0
- package/src/lib/modules/configurable-form/configurable-form.examples.ts +154 -0
- package/src/lib/modules/configurable-form/configurable-form.model.ts +131 -0
- package/src/lib/modules/configurable-form/configurable-form.module.ts +19 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +77 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +395 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +266 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +71 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +20 -0
- package/src/lib/modules/filter/components/filter/filter.component.html +131 -0
- package/src/lib/modules/filter/components/filter/filter.component.scss +245 -0
- package/src/lib/modules/filter/components/filter/filter.component.ts +216 -0
- package/src/lib/modules/filter/filter.models.ts +88 -0
- package/src/lib/modules/filter/filter.module.ts +24 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +112 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +186 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +163 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +95 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +24 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +73 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +321 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +361 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +91 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +22 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +63 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +496 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +445 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +75 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +210 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +55 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +25 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +82 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +95 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +20 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +37 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +94 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +46 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +102 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +50 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +35 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +67 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +34 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +68 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +113 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +74 -0
- package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +533 -0
- package/src/lib/modules/form-builder/form-builder.module.ts +36 -0
- package/src/lib/modules/form-builder/index.ts +9 -0
- package/src/lib/modules/form-builder/models/builder.models.ts +7 -0
- package/src/lib/modules/form-builder/models/field-configurator.models.ts +38 -0
- package/src/lib/modules/form-builder/models/field-selection.models.ts +51 -0
- package/src/lib/modules/form-builder/services/field-configurator.service.ts +258 -0
- package/src/lib/modules/form-builder/services/field-selection.service.ts +299 -0
- package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +670 -0
- package/src/lib/modules/form-builder/tokens/builder.tokens.ts +10 -0
- package/src/lib/modules/form-builder/utils/constants.ts +43 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +29 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +111 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +207 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +35 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +42 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +115 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +267 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +45 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +74 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +252 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +377 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +53 -0
- package/src/lib/modules/form-components/components/input/input.component.html +51 -0
- package/src/lib/modules/form-components/components/input/input.component.scss +128 -0
- package/src/lib/modules/form-components/components/input/input.component.ts +250 -0
- package/src/lib/modules/form-components/components/input/input.models.ts +55 -0
- package/src/lib/modules/form-components/components/radio/radio.component.html +22 -0
- package/src/lib/modules/form-components/components/radio/radio.component.scss +107 -0
- package/src/lib/modules/form-components/components/radio/radio.component.ts +181 -0
- package/src/lib/modules/form-components/components/radio/radio.models.ts +39 -0
- package/src/lib/modules/form-components/components/search/search.component.html +15 -0
- package/src/lib/modules/form-components/components/search/search.component.scss +87 -0
- package/src/lib/modules/form-components/components/search/search.component.ts +213 -0
- package/src/lib/modules/form-components/components/search/search.models.ts +40 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.html +15 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.scss +81 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.ts +166 -0
- package/src/lib/modules/form-components/components/toggle/toggle.models.ts +27 -0
- package/src/lib/modules/form-components/directives/click-outside.directive.ts +22 -0
- package/src/lib/modules/form-components/form-components.module.ts +42 -0
- package/src/lib/modules/form-field-configuration/components/_ffc-controls.scss +89 -0
- package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.html +68 -0
- package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.scss +73 -0
- package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.ts +34 -0
- package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.html +78 -0
- package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.scss +83 -0
- package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.ts +94 -0
- package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.html +38 -0
- package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.scss +42 -0
- package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.ts +92 -0
- package/src/lib/modules/form-field-configuration/form-field-configuration.module.ts +23 -0
- package/src/lib/modules/form-field-configuration/index.ts +7 -0
- package/src/lib/modules/form-field-configuration/models/field-configuration.models.ts +62 -0
- package/src/lib/modules/form-field-configuration/services/config-schema-tree.service.ts +159 -0
- package/src/lib/modules/form-field-configuration/services/field-configuration.service.ts +228 -0
- package/src/lib/modules/material/material.module.ts +94 -0
- package/src/lib/modules/nav/components/nav/nav.component.html +34 -0
- package/src/lib/modules/nav/components/nav/nav.component.scss +171 -0
- package/src/lib/modules/nav/components/nav/nav.component.ts +82 -0
- package/src/lib/modules/nav/nav.models.ts +31 -0
- package/src/lib/modules/nav/nav.module.ts +17 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.html +52 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.scss +155 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.ts +109 -0
- package/src/lib/modules/pagination/pagination.module.ts +17 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +56 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +342 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +135 -0
- package/src/lib/modules/side-nav/side-nav.models.ts +38 -0
- package/src/lib/modules/side-nav/side-nav.module.ts +16 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.html +1330 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +2112 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +3006 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.html +65 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +209 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +131 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +253 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +689 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +1131 -0
- package/src/lib/modules/smart-form/index.ts +10 -0
- package/src/lib/modules/smart-form/models/form-schema.model.ts +793 -0
- package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +21 -0
- package/src/lib/modules/smart-form/services/expression.service.ts +75 -0
- package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +67 -0
- package/src/lib/modules/smart-form/smart-form.examples.ts +1324 -0
- package/src/lib/modules/smart-form/smart-form.module.ts +38 -0
- package/src/lib/modules/smart-form/utils/translation.utils.ts +82 -0
- package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +25 -0
- package/src/lib/modules/smart-form/utils/validation.utils.ts +98 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +283 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +685 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +1128 -0
- package/src/lib/modules/smart-table/models/table-config.model.ts +213 -0
- package/src/lib/modules/smart-table/smart-table.module.ts +30 -0
- package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +28 -0
- package/src/lib/modules/smart-table/utils/smart-table.utils.ts +18 -0
- package/src/lib/modules/snackbar/components/snackbar.component.html +41 -0
- package/src/lib/modules/snackbar/components/snackbar.component.scss +99 -0
- package/src/lib/modules/snackbar/components/snackbar.component.ts +18 -0
- package/src/lib/modules/snackbar/models/snackbar.models.ts +10 -0
- package/src/lib/modules/snackbar/services/snackbar.service.ts +40 -0
- package/src/lib/modules/snackbar/snackbar.module.ts +11 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +47 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +199 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +126 -0
- package/src/lib/modules/summary-card/summary-card.module.ts +18 -0
- package/src/lib/modules/table-column-configuration/components/_tcc-controls.scss +53 -0
- package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.html +47 -0
- package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.scss +50 -0
- package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.ts +33 -0
- package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.html +30 -0
- package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.scss +36 -0
- package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.ts +78 -0
- package/src/lib/modules/table-column-configuration/index.ts +5 -0
- package/src/lib/modules/table-column-configuration/models/table-column-configuration.models.ts +20 -0
- package/src/lib/modules/table-column-configuration/services/table-column-configuration.service.ts +77 -0
- package/src/lib/modules/table-column-configuration/table-column-configuration.module.ts +21 -0
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.html +37 -0
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.scss +102 -0
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.ts +178 -0
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.html +78 -0
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.scss +226 -0
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.ts +595 -0
- package/src/lib/modules/time-picker/models/time-picker.models.ts +49 -0
- package/src/lib/modules/time-picker/time-picker.module.ts +23 -0
- package/src/lib/modules/time-picker/time-picker.theme.scss +87 -0
- package/src/lib/shared-ui.module.ts +55 -0
- package/src/lib/styles/global.scss +10 -0
- package/src/lib/utils/constants.ts +11 -0
- package/src/lib/utils/storage.utils.ts +37 -0
- package/src/lib/utils/string.utils.ts +23 -0
- package/src/lib/utils/translation.utils.ts +87 -0
- package/src/public-api.ts +127 -0
- package/tsconfig.lib.json +15 -0
- package/fesm2022/commons-shared-web-ui.mjs +0 -14823
- package/fesm2022/commons-shared-web-ui.mjs.map +0 -1
- package/index.d.ts +0 -4679
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$default-timepicker-config: (
|
|
4
|
+
// Trigger field (mirrors datepicker defaults)
|
|
5
|
+
height: 2.5rem,
|
|
6
|
+
padding: 0.375rem 1rem,
|
|
7
|
+
label-gap: 0.5rem,
|
|
8
|
+
border-radius: 0.4375rem,
|
|
9
|
+
border-color: #BDC1C6,
|
|
10
|
+
border-width: 1px,
|
|
11
|
+
bg: #FEFEFE,
|
|
12
|
+
color: #202124,
|
|
13
|
+
placeholder-color: #80868B,
|
|
14
|
+
font-size: 0.875rem,
|
|
15
|
+
font-weight: 400,
|
|
16
|
+
font-family: inherit,
|
|
17
|
+
label-font-size: 0.875rem,
|
|
18
|
+
label-font-weight: 500,
|
|
19
|
+
label-color: #202124,
|
|
20
|
+
focus-border-color: #1A73E8,
|
|
21
|
+
error-color: #D93025,
|
|
22
|
+
disabled-bg: #F1F3F4,
|
|
23
|
+
disabled-color: #80868B,
|
|
24
|
+
required-color: #D93025,
|
|
25
|
+
icon-color: #5F6368,
|
|
26
|
+
|
|
27
|
+
// Wheel panel (popup) — greyscale/black is the default theme.
|
|
28
|
+
// Opt into a blue accent by passing these overrides to time-picker-theme():
|
|
29
|
+
// accent: #4D89EB, accent-light: rgba(77,137,235,0.08),
|
|
30
|
+
// accent-border: rgba(77,137,235,0.15), btn-confirm-bg: #4D89EB,
|
|
31
|
+
// btn-confirm-hover: #3b74d1
|
|
32
|
+
accent: #111827,
|
|
33
|
+
accent-light: rgba(0, 0, 0, 0.05),
|
|
34
|
+
accent-border: rgba(0, 0, 0, 0.08),
|
|
35
|
+
item-height: 36px,
|
|
36
|
+
item-font-size: 1rem,
|
|
37
|
+
text-muted: #9CA3AF,
|
|
38
|
+
text-primary: #111827,
|
|
39
|
+
wheels-border: transparent,
|
|
40
|
+
btn-confirm-bg: #111827,
|
|
41
|
+
btn-confirm-hover: #000000,
|
|
42
|
+
btn-cancel-bg: #F3F4F6,
|
|
43
|
+
btn-cancel-hover: #E5E7EB,
|
|
44
|
+
btn-cancel-border: #F3F4F6,
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
@mixin time-picker-theme($user-config: ()) {
|
|
48
|
+
$config: map.merge($default-timepicker-config, $user-config);
|
|
49
|
+
|
|
50
|
+
// Trigger field tokens
|
|
51
|
+
--cc-timepicker-height: #{map.get($config, height)};
|
|
52
|
+
--cc-timepicker-padding: #{map.get($config, padding)};
|
|
53
|
+
--cc-timepicker-label-gap: #{map.get($config, label-gap)};
|
|
54
|
+
--cc-timepicker-border-radius: #{map.get($config, border-radius)};
|
|
55
|
+
--cc-timepicker-border-color: #{map.get($config, border-color)};
|
|
56
|
+
--cc-timepicker-border-width: #{map.get($config, border-width)};
|
|
57
|
+
--cc-timepicker-bg: #{map.get($config, bg)};
|
|
58
|
+
--cc-timepicker-color: #{map.get($config, color)};
|
|
59
|
+
--cc-timepicker-placeholder-color: #{map.get($config, placeholder-color)};
|
|
60
|
+
--cc-timepicker-font-size: #{map.get($config, font-size)};
|
|
61
|
+
--cc-timepicker-font-weight: #{map.get($config, font-weight)};
|
|
62
|
+
--cc-timepicker-font-family: #{map.get($config, font-family)};
|
|
63
|
+
--cc-timepicker-label-font-size: #{map.get($config, label-font-size)};
|
|
64
|
+
--cc-timepicker-label-font-weight: #{map.get($config, label-font-weight)};
|
|
65
|
+
--cc-timepicker-label-color: #{map.get($config, label-color)};
|
|
66
|
+
--cc-timepicker-focus-border-color: #{map.get($config, focus-border-color)};
|
|
67
|
+
--cc-timepicker-error-color: #{map.get($config, error-color)};
|
|
68
|
+
--cc-timepicker-disabled-bg: #{map.get($config, disabled-bg)};
|
|
69
|
+
--cc-timepicker-disabled-color: #{map.get($config, disabled-color)};
|
|
70
|
+
--cc-timepicker-required-color: #{map.get($config, required-color)};
|
|
71
|
+
--cc-timepicker-icon-color: #{map.get($config, icon-color)};
|
|
72
|
+
|
|
73
|
+
// Wheel panel tokens
|
|
74
|
+
--cc-timepicker-accent: #{map.get($config, accent)};
|
|
75
|
+
--cc-timepicker-accent-light: #{map.get($config, accent-light)};
|
|
76
|
+
--cc-timepicker-accent-border: #{map.get($config, accent-border)};
|
|
77
|
+
--cc-timepicker-item-height: #{map.get($config, item-height)};
|
|
78
|
+
--cc-timepicker-item-font-size: #{map.get($config, item-font-size)};
|
|
79
|
+
--cc-timepicker-text-muted: #{map.get($config, text-muted)};
|
|
80
|
+
--cc-timepicker-text-primary: #{map.get($config, text-primary)};
|
|
81
|
+
--cc-timepicker-wheels-border: #{map.get($config, wheels-border)};
|
|
82
|
+
--cc-timepicker-btn-confirm-bg: #{map.get($config, btn-confirm-bg)};
|
|
83
|
+
--cc-timepicker-btn-confirm-hover: #{map.get($config, btn-confirm-hover)};
|
|
84
|
+
--cc-timepicker-btn-cancel-bg: #{map.get($config, btn-cancel-bg)};
|
|
85
|
+
--cc-timepicker-btn-cancel-hover: #{map.get($config, btn-cancel-hover)};
|
|
86
|
+
--cc-timepicker-btn-cancel-border: #{map.get($config, btn-cancel-border)};
|
|
87
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { FormFieldConfigurationModule } from './modules/form-field-configuration/form-field-configuration.module';
|
|
17
|
+
import { TableColumnConfigurationModule } from './modules/table-column-configuration/table-column-configuration.module';
|
|
18
|
+
import { FilterTableSelectorModule } from './modules/filter-table-selector/filter-table-selector.module';
|
|
19
|
+
import { TimePickerModule } from './modules/time-picker/time-picker.module';
|
|
20
|
+
|
|
21
|
+
@NgModule({
|
|
22
|
+
declarations: [],
|
|
23
|
+
imports: [
|
|
24
|
+
CommonModule,
|
|
25
|
+
MaterialModule,
|
|
26
|
+
AlertModule, ButtonModule, ButtonDropdownModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,
|
|
27
|
+
SummaryCardModule,
|
|
28
|
+
ConfigurableFormModule,
|
|
29
|
+
FormComponentsModule,
|
|
30
|
+
SmartFormModule,
|
|
31
|
+
SideNavModule,
|
|
32
|
+
FormBuilderModule,
|
|
33
|
+
FilterTableSelectorModule,
|
|
34
|
+
TimePickerModule,
|
|
35
|
+
FormFieldConfigurationModule,
|
|
36
|
+
TableColumnConfigurationModule,
|
|
37
|
+
FilterTableSelectorModule
|
|
38
|
+
],
|
|
39
|
+
exports: [
|
|
40
|
+
MaterialModule,
|
|
41
|
+
AlertModule, ButtonModule, ButtonDropdownModule, ConfirmationModalModule, FilterSidebarModule, FilterModule,
|
|
42
|
+
SummaryCardModule,
|
|
43
|
+
ConfigurableFormModule,
|
|
44
|
+
FormComponentsModule,
|
|
45
|
+
SmartFormModule,
|
|
46
|
+
SideNavModule,
|
|
47
|
+
FormBuilderModule,
|
|
48
|
+
FilterTableSelectorModule,
|
|
49
|
+
TimePickerModule,
|
|
50
|
+
FormFieldConfigurationModule,
|
|
51
|
+
TableColumnConfigurationModule,
|
|
52
|
+
FilterTableSelectorModule
|
|
53
|
+
],
|
|
54
|
+
})
|
|
55
|
+
export class SharedUiModule { }
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
@use '../modules/side-nav/side-nav.theme' as sideNav;
|
|
2
2
|
@use '../modules/form-builder/form-builder.theme' as fb;
|
|
3
3
|
@use '../modules/filter-table-selector/filter-table-selector.theme' as fts;
|
|
4
|
+
@use '../modules/time-picker/time-picker.theme' as tp;
|
|
4
5
|
@import 'quill/dist/quill.snow.css';
|
|
5
6
|
@import './utilities.scss';
|
|
6
7
|
|
|
7
8
|
:root {
|
|
8
9
|
@include sideNav.side-nav-theme();
|
|
9
10
|
@include fb.form-builder-theme();
|
|
11
|
+
@include tp.time-picker-theme();
|
|
10
12
|
--cc-card-bg: #ffffff;
|
|
11
13
|
--cc-card-border-color: #e0e0e0;
|
|
12
14
|
--cc-card-border-radius: 8px;
|
|
@@ -85,6 +87,14 @@
|
|
|
85
87
|
--ms-btn-add-color: #3b82f6;
|
|
86
88
|
--ms-btn-add-hover: #2563eb;
|
|
87
89
|
|
|
90
|
+
/* Link List */
|
|
91
|
+
--cc-sf-link-item-bg: #ffffff;
|
|
92
|
+
--cc-sf-link-item-border: #e8eaed;
|
|
93
|
+
--cc-sf-link-item-text: #111827;
|
|
94
|
+
--cc-sf-link-delete-color: #ef4444;
|
|
95
|
+
--cc-sf-link-edit-color: #4b5563;
|
|
96
|
+
--cc-sf-link-save-color: #16a34a;
|
|
97
|
+
|
|
88
98
|
@include sideNav.side-nav-theme();
|
|
89
99
|
}
|
|
90
100
|
|
|
@@ -0,0 +1,11 @@
|
|
|
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';
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
|
|
9
|
+
// ── Form Field Configuration ────────────────────────────────────────────────
|
|
10
|
+
export * from './lib/modules/form-field-configuration/form-field-configuration.module';
|
|
11
|
+
export * from './lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component';
|
|
12
|
+
export * from './lib/modules/form-field-configuration/components/config-section-node/config-section-node.component';
|
|
13
|
+
export * from './lib/modules/form-field-configuration/components/config-field-node/config-field-node.component';
|
|
14
|
+
export * from './lib/modules/form-field-configuration/models/field-configuration.models';
|
|
15
|
+
export * from './lib/modules/form-field-configuration/services/field-configuration.service';
|
|
16
|
+
export * from './lib/modules/form-field-configuration/services/config-schema-tree.service';
|
|
17
|
+
|
|
18
|
+
// ── Table Column Configuration ──────────────────────────────────────────────
|
|
19
|
+
export * from './lib/modules/table-column-configuration/table-column-configuration.module';
|
|
20
|
+
export * from './lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component';
|
|
21
|
+
export * from './lib/modules/table-column-configuration/components/config-column-node/config-column-node.component';
|
|
22
|
+
export * from './lib/modules/table-column-configuration/models/table-column-configuration.models';
|
|
23
|
+
export * from './lib/modules/table-column-configuration/services/table-column-configuration.service';
|
|
24
|
+
|
|
25
|
+
export * from './lib/shared-ui.module';
|
|
26
|
+
export * from './lib/modules/material/material.module';
|
|
27
|
+
export * from './lib/utils/storage.utils';
|
|
28
|
+
export * from './lib/utils/string.utils';
|
|
29
|
+
export * from './lib/utils/translation.utils';
|
|
30
|
+
export * from './lib/modules/summary-card/summary-card.module';
|
|
31
|
+
export * from './lib/modules/summary-card/components/summary-card/summary-card.component';
|
|
32
|
+
export * from './lib/modules/configurable-form/configurable-form.module';
|
|
33
|
+
export * from './lib/modules/configurable-form/component/configurable-form.component';
|
|
34
|
+
// Export Configurable Form resources namespaced to avoid collisions
|
|
35
|
+
export * from './lib/modules/configurable-form/configurable-form.model';
|
|
36
|
+
export * as ConfigurableFormExamples from './lib/modules/configurable-form/configurable-form.examples';
|
|
37
|
+
|
|
38
|
+
export * from './lib/modules/pagination/pagination.module';
|
|
39
|
+
export * from './lib/modules/pagination/components/pagination/pagination.component';
|
|
40
|
+
export * from './lib/modules/nav/nav.module';
|
|
41
|
+
export * from './lib/modules/nav/components/nav/nav.component';
|
|
42
|
+
export * from './lib/modules/nav/nav.models';
|
|
43
|
+
export * from './lib/modules/side-nav/side-nav.module';
|
|
44
|
+
export * from './lib/modules/side-nav/components/side-nav/side-nav.component';
|
|
45
|
+
export * from './lib/modules/side-nav/side-nav.models';
|
|
46
|
+
export * from './lib/utils/constants';
|
|
47
|
+
export * from './lib/modules/alert/alert.module';
|
|
48
|
+
export * from './lib/modules/alert/alert.models';
|
|
49
|
+
export * from './lib/modules/alert/components/alert/alert.component';
|
|
50
|
+
export * from './lib/modules/button/button.module';
|
|
51
|
+
export * from './lib/modules/button/button.models';
|
|
52
|
+
export * from './lib/modules/button/components/button/button.component';
|
|
53
|
+
export * from './lib/modules/button-dropdown/button-dropdown.module';
|
|
54
|
+
export * from './lib/modules/button-dropdown/button-dropdown.models';
|
|
55
|
+
export * from './lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component';
|
|
56
|
+
export * from './lib/modules/confirmation-modal/confirmation-modal.module';
|
|
57
|
+
export * from './lib/modules/confirmation-modal/confirmation-modal.models';
|
|
58
|
+
export * from './lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component';
|
|
59
|
+
export * from './lib/modules/filter-sidebar/filter-sidebar.module';
|
|
60
|
+
export * from './lib/modules/filter-sidebar/filter-sidebar.models';
|
|
61
|
+
export * from './lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component';
|
|
62
|
+
export * from './lib/modules/filter/filter.module';
|
|
63
|
+
export * from './lib/modules/filter/filter.models';
|
|
64
|
+
export * from './lib/modules/filter/components/filter/filter.component';
|
|
65
|
+
export * from './lib/modules/form-components/form-components.module';
|
|
66
|
+
export * from './lib/modules/form-components/directives/click-outside.directive';
|
|
67
|
+
export * from './lib/modules/form-components/components/input/input.component';
|
|
68
|
+
export * from './lib/modules/form-components/components/input/input.models';
|
|
69
|
+
export * from './lib/modules/form-components/components/dropdown/dropdown.component';
|
|
70
|
+
export * from './lib/modules/form-components/components/dropdown/dropdown.models';
|
|
71
|
+
export * from './lib/modules/form-components/components/checkbox/checkbox.component';
|
|
72
|
+
export * from './lib/modules/form-components/components/checkbox/checkbox.models';
|
|
73
|
+
export * from './lib/modules/form-components/components/radio/radio.component';
|
|
74
|
+
export * from './lib/modules/form-components/components/radio/radio.models';
|
|
75
|
+
export * from './lib/modules/form-components/components/toggle/toggle.component';
|
|
76
|
+
export * from './lib/modules/form-components/components/toggle/toggle.models';
|
|
77
|
+
export * from './lib/modules/form-components/components/datepicker/datepicker.component';
|
|
78
|
+
export * from './lib/modules/form-components/components/datepicker/datepicker.models';
|
|
79
|
+
export * from './lib/modules/form-components/components/search/search.component';
|
|
80
|
+
export * from './lib/modules/form-components/components/search/search.models';
|
|
81
|
+
|
|
82
|
+
export * from './lib/modules/time-picker/time-picker.module';
|
|
83
|
+
export * from './lib/modules/time-picker/components/time-picker/time-picker.component';
|
|
84
|
+
export * from './lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component';
|
|
85
|
+
export * from './lib/modules/time-picker/models/time-picker.models';
|
|
86
|
+
export * from './lib/modules/smart-table/smart-table.module';
|
|
87
|
+
export * from './lib/modules/smart-table/components/smart-table/smart-table.component';
|
|
88
|
+
export * from './lib/modules/smart-table/models/table-config.model';
|
|
89
|
+
export * from './lib/modules/smart-table/utils/smart-table.utils';
|
|
90
|
+
export * from './lib/modules/smart-form/smart-form.module';
|
|
91
|
+
export * from './lib/modules/smart-form/components/smart-form/smart-form.component';
|
|
92
|
+
export {
|
|
93
|
+
FormSchema,
|
|
94
|
+
SubmitConfig,
|
|
95
|
+
FieldConfig,
|
|
96
|
+
SectionConfig,
|
|
97
|
+
StepperConfig,
|
|
98
|
+
TextConfig,
|
|
99
|
+
NumberConfig,
|
|
100
|
+
DateConfig,
|
|
101
|
+
EmailConfig,
|
|
102
|
+
PhoneConfig,
|
|
103
|
+
GeneratedConfig,
|
|
104
|
+
RangeConfig,
|
|
105
|
+
AttachmentConfig,
|
|
106
|
+
LocationConfig,
|
|
107
|
+
RatingConfig,
|
|
108
|
+
ValidationResult,
|
|
109
|
+
LengthConstraint,
|
|
110
|
+
OptionItem,
|
|
111
|
+
SuffixActionIcon
|
|
112
|
+
} from './lib/modules/smart-form/models/form-schema.model';
|
|
113
|
+
export * from './lib/modules/smart-form/models/hierarchy-config.model';
|
|
114
|
+
export * from './lib/modules/smart-form/services/expression.service';
|
|
115
|
+
export * from './lib/modules/smart-form/services/smart-form-controller.service';
|
|
116
|
+
export * from './lib/modules/smart-form/utils/validation.utils';
|
|
117
|
+
export * as SmartFormExamples from './lib/modules/smart-form/smart-form.examples';
|
|
118
|
+
|
|
119
|
+
export * from './lib/modules/snackbar/snackbar.module';
|
|
120
|
+
export * from './lib/modules/snackbar/components/snackbar.component';
|
|
121
|
+
export * from './lib/modules/snackbar/models/snackbar.models';
|
|
122
|
+
export * from './lib/modules/snackbar/services/snackbar.service';
|
|
123
|
+
|
|
124
|
+
// ── FilterTableSelector ─────────────────────────────────────────────────────
|
|
125
|
+
export * from './lib/modules/filter-table-selector/filter-table-selector.module';
|
|
126
|
+
export * from './lib/modules/filter-table-selector/filter-table-selector.models';
|
|
127
|
+
export * from './lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component';
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|