@seniorsistemas/data-seniorx-core 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/core/config/dynamic-view-builder.config.d.ts +3 -0
  2. package/core/constants/dynamic-view-builder.const.d.ts +15 -0
  3. package/core/constants/picklist.const.d.ts +4 -0
  4. package/core/constants/timeline.const.d.ts +6 -0
  5. package/core/types/confirm.type.d.ts +1 -0
  6. package/core/types/dynamic-view-builder.type.d.ts +130 -0
  7. package/core/types/row-card.type.d.ts +10 -0
  8. package/core/types/timeline.type.d.ts +22 -0
  9. package/esm2022/core/config/dynamic-view-builder.config.mjs +396 -0
  10. package/esm2022/core/config/row-card.type.config.mjs +2 -1
  11. package/esm2022/core/constants/dynamic-view-builder.const.mjs +24 -0
  12. package/esm2022/core/constants/picklist.const.mjs +5 -1
  13. package/esm2022/core/constants/timeline.const.mjs +6 -0
  14. package/esm2022/core/handlers/sqlFormatter.mjs +3 -2
  15. package/esm2022/core/types/confirm.type.mjs +1 -1
  16. package/esm2022/core/types/dynamic-view-builder.type.mjs +2 -0
  17. package/esm2022/core/types/row-card.type.mjs +1 -1
  18. package/esm2022/core/types/timeline.type.mjs +2 -0
  19. package/esm2022/core/utils/layout.util.mjs +4 -4
  20. package/esm2022/core/utils/number-input.util.mjs +2 -2
  21. package/esm2022/features/breadcrumb/breadcrumb.component.mjs +21 -3
  22. package/esm2022/features/button/button.component.mjs +5 -5
  23. package/esm2022/features/card-list/card/card.component.mjs +4 -6
  24. package/esm2022/features/card-list/card-list.component.mjs +4 -7
  25. package/esm2022/features/code-editor/code-editor.component.mjs +5 -5
  26. package/esm2022/features/color-picker/color-picker.component.mjs +4 -4
  27. package/esm2022/features/combobox/combobox.component.mjs +8 -8
  28. package/esm2022/features/confirm/confirm.component.mjs +8 -4
  29. package/esm2022/features/country-phone-picker/country-phone-picker.component.mjs +6 -8
  30. package/esm2022/features/empty-state/empty-state.component.mjs +3 -3
  31. package/esm2022/features/hyperlink/hyperlink.component.mjs +10 -12
  32. package/esm2022/features/icon-picker/icon-picker.component.mjs +3 -3
  33. package/esm2022/features/info-sign/info-sign.component.mjs +3 -3
  34. package/esm2022/features/list/list.component.mjs +1 -1
  35. package/esm2022/features/loading-state/loading-state.component.mjs +20 -25
  36. package/esm2022/features/localized-number-input/localized-number-input.component.mjs +4 -4
  37. package/esm2022/features/mask/mask.component.mjs +4 -4
  38. package/esm2022/features/modal/modal.component.mjs +5 -5
  39. package/esm2022/features/modalc/modalc.component.mjs +1 -1
  40. package/esm2022/features/number-input/number-input.component.mjs +4 -4
  41. package/esm2022/features/numeric/numeric.component.mjs +4 -6
  42. package/esm2022/features/paginator/paginator.component.mjs +2 -2
  43. package/esm2022/features/password-strength/password-strength.component.mjs +3 -3
  44. package/esm2022/features/picklist/picklist.component.mjs +50 -9
  45. package/esm2022/features/radio/radio.component.mjs +12 -12
  46. package/esm2022/features/row-card-list/row-card/row-card.component.mjs +32 -9
  47. package/esm2022/features/row-card-list/row-card-list.component.mjs +3 -3
  48. package/esm2022/features/searchbox/searchbox.component.mjs +1 -1
  49. package/esm2022/features/sidebar/sidebar.component.mjs +7 -3
  50. package/esm2022/features/switch/switch.component.mjs +3 -3
  51. package/esm2022/features/table/table.component.mjs +3 -3
  52. package/esm2022/features/textarea/textarea.component.mjs +4 -4
  53. package/esm2022/features/textbox/textbox.component.mjs +4 -4
  54. package/esm2022/features/timeline/timeline.component.mjs +90 -0
  55. package/esm2022/features/toast/toast.component.mjs +4 -6
  56. package/esm2022/features/tooltip/tooltip.component.mjs +3 -3
  57. package/esm2022/features/visual-sql-editor/visual-sql-editor.component.mjs +2810 -0
  58. package/esm2022/locales/en.json +202 -1
  59. package/esm2022/locales/es-CO.json +202 -1
  60. package/esm2022/locales/pt.json +202 -1
  61. package/esm2022/public-api.mjs +6 -1
  62. package/features/breadcrumb/breadcrumb.component.d.ts +2 -0
  63. package/features/button/button.component.d.ts +2 -2
  64. package/features/code-editor/code-editor.component.d.ts +2 -2
  65. package/features/hyperlink/hyperlink.component.d.ts +3 -3
  66. package/features/loading-state/loading-state.component.d.ts +3 -4
  67. package/features/modal/modal.component.d.ts +2 -2
  68. package/features/picklist/picklist.component.d.ts +10 -1
  69. package/features/radio/radio.component.d.ts +4 -4
  70. package/features/row-card-list/row-card/row-card.component.d.ts +8 -1
  71. package/features/sidebar/sidebar.component.d.ts +2 -1
  72. package/features/timeline/timeline.component.d.ts +27 -0
  73. package/features/visual-sql-editor/visual-sql-editor.component.d.ts +560 -0
  74. package/fesm2022/seniorsistemas-data-seniorx-core.mjs +4161 -176
  75. package/fesm2022/seniorsistemas-data-seniorx-core.mjs.map +1 -1
  76. package/package.json +2 -2
  77. package/public-api.d.ts +7 -0
  78. package/src/locales/en.json +211 -1
  79. package/src/locales/es-CO.json +211 -1
  80. package/src/locales/pt.json +211 -1
  81. package/styles.css +1 -1
@@ -0,0 +1,3 @@
1
+ import type { DynamicViewBuilderConfig } from '../types/dynamic-view-builder.type';
2
+ export declare const DYNAMIC_VIEW_BUILDER_DEFAULT_CONFIG: DynamicViewBuilderConfig;
3
+ export declare function createDynamicViewBuilderConfig(overrides?: Partial<DynamicViewBuilderConfig>): DynamicViewBuilderConfig;
@@ -0,0 +1,15 @@
1
+ export declare const DYNAMIC_VIEW_BUILDER_COMPONENT_SELECTOR = "sdc-visual-sql-editor";
2
+ export declare const DYNAMIC_VIEW_BUILDER_TRANSLATION_PREFIX = "platform.datacore.dynamic_view_builder";
3
+ export declare const DYNAMIC_VIEW_BUILDER_KIND: {
4
+ readonly generated: "generated";
5
+ readonly manual: "manual";
6
+ };
7
+ export declare const DYNAMIC_VIEW_BUILDER_VIEW_MODE: {
8
+ readonly create: "create";
9
+ readonly edit: "edit";
10
+ readonly readonly: "readonly";
11
+ };
12
+ export declare const DYNAMIC_VIEW_BUILDER_SECTION_IDS: readonly ["sources", "joins", "fields", "groupBy", "sorting", "filters", "preview"];
13
+ export declare const DYNAMIC_VIEW_BUILDER_TABLE_WIDTH = "100%";
14
+ export declare const DYNAMIC_VIEW_BUILDER_DEFAULT_TABLE_ROWS = 10;
15
+ export declare const DYNAMIC_VIEW_BUILDER_PREVIEW_MAX_COLUMNS = 6;
@@ -4,6 +4,10 @@ export declare const DEFAULT_PICKLIST_SUBTITLE_KEY = "code";
4
4
  export declare const DEFAULT_PICKLIST_ICON_CLASS = "fas fa-rocket";
5
5
  export declare const DEFAULT_PICKLIST_SELECTION_ICON_CLASS = "fas fa-check-square";
6
6
  export declare const DEFAULT_PICKLIST_PLACEHOLDER = "platform.datacore.picklist.defaults.placeholder";
7
+ export declare const DEFAULT_PICKLIST_EMPTY_TITLE = "platform.datacore.no_results";
8
+ export declare const DEFAULT_PICKLIST_EMPTY_TEXT = "platform.datacore.try_other_filters";
9
+ export declare const DEFAULT_PICKLIST_RESULTS_COUNTER_SINGULAR_LABEL = "platform.datacore.record_found";
10
+ export declare const DEFAULT_PICKLIST_RESULTS_COUNTER_PLURAL_LABEL = "platform.datacore.records_found";
7
11
  export declare const DEFAULT_PICKLIST_FIRST = 0;
8
12
  export declare const DEFAULT_PICKLIST_ROWS = 6;
9
13
  export declare const DEFAULT_PICKLIST_ROWS_PER_PAGE_OPTIONS: readonly [5, 10];
@@ -0,0 +1,6 @@
1
+ import type { TimelineOrientation } from '../types/timeline.type';
2
+ export declare const TIMELINE_DEFAULT_ACTIVE_INDEX = 0;
3
+ export declare const TIMELINE_DEFAULT_INTERACTIVE = false;
4
+ export declare const TIMELINE_DEFAULT_ORIENTATION: TimelineOrientation;
5
+ export declare const TIMELINE_DEFAULT_RESPONSIVE = true;
6
+ export declare const TIMELINE_DEFAULT_SHOW_DESCRIPTIONS = true;
@@ -7,4 +7,5 @@ export interface Confirm {
7
7
  reject: () => void;
8
8
  acceptLabel?: string;
9
9
  rejectLabel?: string;
10
+ hideRejectAction?: boolean;
10
11
  }
@@ -0,0 +1,130 @@
1
+ export type DynamicViewBuilderKind = 'generated' | 'manual';
2
+ export type DynamicViewBuilderViewMode = 'create' | 'edit' | 'readonly';
3
+ export type DynamicViewBuilderDataType = 'string' | 'integer' | 'decimal' | 'time' | 'datetime' | 'date' | 'boolean';
4
+ export type DynamicViewBuilderFilterConnector = 'AND' | 'OR';
5
+ export type DynamicViewBuilderFilterValueType = 'value' | 'parameter' | 'domain';
6
+ export type DynamicViewBuilderSectionId = 'sources' | 'joins' | 'fields' | 'groupBy' | 'functions' | 'sorting' | 'filters' | 'preview';
7
+ export interface DynamicViewBuilderOption {
8
+ text: string;
9
+ value: string;
10
+ disabled?: boolean;
11
+ }
12
+ export interface DynamicViewBuilderTableOption extends DynamicViewBuilderOption {
13
+ schema?: string;
14
+ displayName?: string;
15
+ description?: string;
16
+ }
17
+ export interface DynamicViewBuilderColumnOption extends DynamicViewBuilderOption {
18
+ table: string;
19
+ schema?: string;
20
+ fullName: string;
21
+ displayName?: string;
22
+ dataType: DynamicViewBuilderDataType;
23
+ isSortable?: boolean;
24
+ isAggregatable?: boolean;
25
+ supportsMultipleValues?: boolean;
26
+ }
27
+ export interface DynamicViewBuilderMetadata {
28
+ title: string;
29
+ description: string;
30
+ tags: string[];
31
+ kind: DynamicViewBuilderKind;
32
+ viewMode: DynamicViewBuilderViewMode;
33
+ overrideUserTimezone: boolean;
34
+ timezoneOffset: string;
35
+ timeShowsSeconds: boolean;
36
+ formatDecimalColumns: boolean;
37
+ }
38
+ export interface DynamicViewBuilderSection {
39
+ id: DynamicViewBuilderSectionId;
40
+ title: string;
41
+ description: string;
42
+ enabled: boolean;
43
+ }
44
+ export interface DynamicViewBuilderSource {
45
+ table: string;
46
+ alias: string;
47
+ schema?: string;
48
+ label?: string;
49
+ }
50
+ export interface DynamicViewBuilderJoin {
51
+ sourceColumn: string;
52
+ targetColumn: string;
53
+ operator: string;
54
+ }
55
+ export interface DynamicViewBuilderField {
56
+ column: string;
57
+ alias?: string;
58
+ width?: string;
59
+ function?: DynamicViewBuilderFieldFunction | null;
60
+ }
61
+ export interface DynamicViewBuilderFieldFunction {
62
+ functionName: string;
63
+ alias?: string;
64
+ }
65
+ export interface DynamicViewBuilderFunction {
66
+ functionName: string;
67
+ column: string;
68
+ alias: string;
69
+ }
70
+ export interface DynamicViewBuilderSort {
71
+ column: string;
72
+ functionName?: string;
73
+ direction: string;
74
+ }
75
+ export interface DynamicViewBuilderFilter {
76
+ column: string;
77
+ operator: string;
78
+ optional: boolean;
79
+ connector: DynamicViewBuilderFilterConnector;
80
+ valueType: DynamicViewBuilderFilterValueType;
81
+ value?: string;
82
+ values?: string[];
83
+ parameterName?: string;
84
+ domainExpression?: string;
85
+ }
86
+ export interface DynamicViewBuilderGeneratedConfig {
87
+ sources: DynamicViewBuilderSource[];
88
+ joins: DynamicViewBuilderJoin[];
89
+ fields: Array<string | DynamicViewBuilderField>;
90
+ groupBy: string[];
91
+ functions: DynamicViewBuilderFunction[];
92
+ sorting: DynamicViewBuilderSort[];
93
+ filters: DynamicViewBuilderFilter[];
94
+ }
95
+ export interface DynamicViewBuilderManualConfig {
96
+ sql: string;
97
+ }
98
+ export interface DynamicViewBuilderPreviewColumn {
99
+ field: string;
100
+ header: string;
101
+ type?: string;
102
+ }
103
+ export interface DynamicViewBuilderPreviewConfig {
104
+ columns: DynamicViewBuilderPreviewColumn[];
105
+ rows: Record<string, unknown>[];
106
+ }
107
+ export interface DynamicViewBuilderAvailableData {
108
+ tables: DynamicViewBuilderTableOption[];
109
+ columns: DynamicViewBuilderColumnOption[];
110
+ functions: DynamicViewBuilderOption[];
111
+ joinOperators: DynamicViewBuilderOption[];
112
+ filterOperators: DynamicViewBuilderOption[];
113
+ filterConnectors: DynamicViewBuilderOption[];
114
+ sortDirections: DynamicViewBuilderOption[];
115
+ timezoneOffsets: DynamicViewBuilderOption[];
116
+ }
117
+ export interface DynamicViewBuilderActions {
118
+ saveLabelKey?: string;
119
+ cancelLabelKey?: string;
120
+ }
121
+ export interface DynamicViewBuilderConfig {
122
+ translationPrefix: string;
123
+ metadata: DynamicViewBuilderMetadata;
124
+ sections: DynamicViewBuilderSection[];
125
+ availableData: DynamicViewBuilderAvailableData;
126
+ generated: DynamicViewBuilderGeneratedConfig;
127
+ manual: DynamicViewBuilderManualConfig;
128
+ preview: DynamicViewBuilderPreviewConfig;
129
+ actions?: DynamicViewBuilderActions;
130
+ }
@@ -1,4 +1,9 @@
1
+ import type { BadgeColor } from "./badge.type";
1
2
  import { Priority } from "./semantics.type";
3
+ export interface RowCardBadge {
4
+ label: string;
5
+ color?: BadgeColor;
6
+ }
2
7
  export interface OptionsRowCard {
3
8
  expandable?: boolean;
4
9
  buttonLabel?: string;
@@ -7,8 +12,10 @@ export interface OptionsRowCard {
7
12
  leftTitleColor?: string;
8
13
  leftSubtitleColor?: string;
9
14
  infoTooltip?: string | null;
15
+ statusTooltip?: string | null;
10
16
  rightTitleColor?: string;
11
17
  rightSubtitleColor?: string;
18
+ badgeTitle?: string;
12
19
  }
13
20
  export interface RowCardListOptions {
14
21
  enablePagination?: boolean;
@@ -26,10 +33,13 @@ export interface RowCard {
26
33
  id: string;
27
34
  left_title: string;
28
35
  left_subtitle?: string;
36
+ right_title?: string;
29
37
  disabled?: boolean;
30
38
  tag?: string;
31
39
  right_subtitle?: string;
32
40
  hasBorder?: boolean;
41
+ badge?: RowCardBadge;
42
+ buttonLabel?: string;
33
43
  meta?: Record<string, unknown>;
34
44
  }
35
45
  export declare const mockRowCardList: RowCard[];
@@ -0,0 +1,22 @@
1
+ export type TimelineStepState = 'pending' | 'active' | 'completed' | 'disabled';
2
+ export type TimelineOrientation = 'horizontal' | 'vertical';
3
+ export type TimelineTranslateParams = Record<string, string | number | boolean | null | undefined>;
4
+ export interface TimelineItem {
5
+ id: string;
6
+ label: string;
7
+ labelParams?: TimelineTranslateParams;
8
+ description?: string;
9
+ descriptionParams?: TimelineTranslateParams;
10
+ indicatorLabel?: string;
11
+ indicatorLabelParams?: TimelineTranslateParams;
12
+ iconClass?: string;
13
+ ariaLabel?: string;
14
+ ariaLabelParams?: TimelineTranslateParams;
15
+ state?: TimelineStepState;
16
+ disabled?: boolean;
17
+ }
18
+ export interface TimelineStepSelectEvent {
19
+ index: number;
20
+ item: TimelineItem;
21
+ state: TimelineStepState;
22
+ }