cat-documents-ng 1.0.6 → 1.0.8
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/README.md +322 -322
- package/Shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +44 -0
- package/Shared/components/table-primary/table-primary.component.d.ts +31 -0
- package/Shared/components/table-primary/table-primary.model.d.ts +19 -0
- package/Shared/constant/ERROR.d.ts +52 -0
- package/Shared/constant/SHARED.d.ts +546 -0
- package/{src/Shared/constant/URLS.ts → Shared/constant/URLS.d.ts} +25 -31
- package/Shared/services/app-config.service.d.ts +51 -0
- package/{src/Shared/services/global-error.handler.ts → Shared/services/global-error.handler.d.ts} +9 -11
- package/Shared/services/session.service.d.ts +46 -0
- package/Shared/shared.module.d.ts +14 -0
- package/fesm2022/cat-documents-ng.mjs +11405 -0
- package/fesm2022/cat-documents-ng.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/document/components/document-actions/document-actions.component.d.ts +78 -0
- package/lib/document/components/document-container/document-container.component.d.ts +162 -0
- package/lib/document/components/document-content-viewer/document-content-viewer.component.d.ts +291 -0
- package/lib/document/components/document-history/document-history.component.d.ts +160 -0
- package/lib/document/components/document-list/document-list.component.d.ts +299 -0
- package/lib/document/components/document-list-item/document-list-item.component.d.ts +28 -0
- package/lib/document/components/document-search/document-search.component.d.ts +77 -0
- package/lib/document/components/document-status/document-status.component.d.ts +24 -0
- package/lib/document/components/document-upload/document-upload.component.d.ts +321 -0
- package/lib/document/components/document-viewer/document-viewer.component.d.ts +137 -0
- package/lib/document/components/document-zoom-controls/document-zoom-controls.component.d.ts +33 -0
- package/lib/document/components/documents-menu/documents-menu.component.d.ts +110 -0
- package/{src/lib/document/components/folder-block/folder-block.component.ts → lib/document/components/folder-block/folder-block.component.d.ts} +12 -28
- package/lib/document/components/folder-container/folder-container.component.d.ts +162 -0
- package/lib/document/components/linked-document/linked-document.component.d.ts +39 -0
- package/lib/document/components/request-document/request-document.component.d.ts +69 -0
- package/lib/document/components/sidebar/sidebar.component.d.ts +109 -0
- package/lib/document/components/user-list/user-list.component.d.ts +34 -0
- package/lib/document/constant/DOCUMENT_HISTORY.d.ts +41 -0
- package/lib/document/directives/document.directive.d.ts +20 -0
- package/lib/document/directives/permission.directive.d.ts +38 -0
- package/lib/document/document.module.d.ts +60 -0
- package/{src/lib/document/models/document-alert.model.ts → lib/document/models/document-alert.model.d.ts} +4 -11
- package/lib/document/models/document-category.model.d.ts +24 -0
- package/lib/document/models/document-history.model.d.ts +94 -0
- package/lib/document/models/document-list-response.model.d.ts +33 -0
- package/lib/document/models/document-type.model.d.ts +37 -0
- package/lib/document/models/document.model.d.ts +44 -0
- package/{src/lib/document/models/folder.model.ts → lib/document/models/folder.model.d.ts} +4 -10
- package/lib/document/models/status-data.model.d.ts +27 -0
- package/lib/document/models/uploaded-file-response.model.d.ts +7 -0
- package/lib/document/models/user-list.model.d.ts +8 -0
- package/lib/document/services/csv-parser.service.d.ts +88 -0
- package/lib/document/services/document-actions.service.d.ts +48 -0
- package/lib/document/services/document-content-type.service.d.ts +85 -0
- package/lib/document/services/document-history-style.service.d.ts +34 -0
- package/lib/document/services/document-history.service.d.ts +42 -0
- package/lib/document/services/document-http.service.d.ts +179 -0
- package/lib/document/services/document-list.service.d.ts +74 -0
- package/lib/document/services/document-menu.service.d.ts +122 -0
- package/lib/document/services/document-scroll.service.d.ts +55 -0
- package/lib/document/services/document-table-builder.service.d.ts +38 -0
- package/lib/document/services/document-upload-business.service.d.ts +107 -0
- package/lib/document/services/document-upload-data.service.d.ts +40 -0
- package/lib/document/services/document-upload-form.service.d.ts +41 -0
- package/lib/document/services/document-upload.service.d.ts +99 -0
- package/lib/document/services/document-viewer.service.d.ts +97 -0
- package/lib/document/services/document-zoom.service.d.ts +81 -0
- package/lib/document/services/document.service.d.ts +161 -0
- package/lib/document/services/eml-parser.service.d.ts +116 -0
- package/lib/document/services/excel-parser.service.d.ts +169 -0
- package/lib/document/services/file-format.service.d.ts +34 -0
- package/lib/document/services/status-calculator.service.d.ts +20 -0
- package/lib/document/services/user-list.service.d.ts +29 -0
- package/lib/document/state/document.query.d.ts +243 -0
- package/{src/lib/document/state/document.service.ts → lib/document/state/document.service.d.ts} +15 -46
- package/lib/document/state/document.state.d.ts +61 -0
- package/lib/document/state/document.store.d.ts +56 -0
- package/package.json +11 -5
- package/{src/public-api.ts → public-api.d.ts} +0 -4
- package/ng-package.json +0 -10
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.html +0 -3
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.scss +0 -13
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -70
- package/src/Shared/components/confirmation-dialog/confirmation-dialog.component.ts +0 -133
- package/src/Shared/components/table-primary/table-primary.component.html +0 -66
- package/src/Shared/components/table-primary/table-primary.component.scss +0 -227
- package/src/Shared/components/table-primary/table-primary.component.spec.ts +0 -23
- package/src/Shared/components/table-primary/table-primary.component.ts +0 -143
- package/src/Shared/components/table-primary/table-primary.model.ts +0 -21
- package/src/Shared/constant/ERROR.ts +0 -55
- package/src/Shared/constant/PERMISSIONS.ts +0 -17
- package/src/Shared/constant/SHARED.ts +0 -936
- package/src/Shared/services/app-config.service.spec.ts +0 -19
- package/src/Shared/services/app-config.service.ts +0 -73
- package/src/Shared/services/session.service.spec.ts +0 -16
- package/src/Shared/services/session.service.ts +0 -76
- package/src/Shared/shared.module.ts +0 -25
- package/src/lib/document/components/csv-viewer/csv-viewer.component.ts +0 -1
- package/src/lib/document/components/document-actions/document-actions.component.html +0 -59
- package/src/lib/document/components/document-actions/document-actions.component.scss +0 -362
- package/src/lib/document/components/document-actions/document-actions.component.spec.ts +0 -297
- package/src/lib/document/components/document-actions/document-actions.component.ts +0 -163
- package/src/lib/document/components/document-container/document-container.component.html +0 -36
- package/src/lib/document/components/document-container/document-container.component.scss +0 -144
- package/src/lib/document/components/document-container/document-container.component.spec.ts +0 -110
- package/src/lib/document/components/document-container/document-container.component.ts +0 -363
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.html +0 -332
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.scss +0 -1877
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.spec.ts +0 -258
- package/src/lib/document/components/document-content-viewer/document-content-viewer.component.ts +0 -664
- package/src/lib/document/components/document-history/document-history.component.html +0 -96
- package/src/lib/document/components/document-history/document-history.component.scss +0 -392
- package/src/lib/document/components/document-history/document-history.component.spec.ts +0 -93
- package/src/lib/document/components/document-history/document-history.component.ts +0 -373
- package/src/lib/document/components/document-list/document-list.component.html +0 -46
- package/src/lib/document/components/document-list/document-list.component.scss +0 -513
- package/src/lib/document/components/document-list/document-list.component.spec.ts +0 -486
- package/src/lib/document/components/document-list/document-list.component.ts +0 -682
- package/src/lib/document/components/document-list-item/document-list-item.component.html +0 -36
- package/src/lib/document/components/document-list-item/document-list-item.component.scss +0 -34
- package/src/lib/document/components/document-list-item/document-list-item.component.spec.ts +0 -75
- package/src/lib/document/components/document-list-item/document-list-item.component.ts +0 -40
- package/src/lib/document/components/document-search/document-search.component.html +0 -64
- package/src/lib/document/components/document-search/document-search.component.scss +0 -206
- package/src/lib/document/components/document-search/document-search.component.spec.ts +0 -82
- package/src/lib/document/components/document-search/document-search.component.ts +0 -163
- package/src/lib/document/components/document-status/document-status.component.html +0 -31
- package/src/lib/document/components/document-status/document-status.component.scss +0 -192
- package/src/lib/document/components/document-status/document-status.component.spec.ts +0 -23
- package/src/lib/document/components/document-status/document-status.component.ts +0 -87
- package/src/lib/document/components/document-upload/document-upload.component.html +0 -160
- package/src/lib/document/components/document-upload/document-upload.component.scss +0 -235
- package/src/lib/document/components/document-upload/document-upload.component.spec.ts +0 -95
- package/src/lib/document/components/document-upload/document-upload.component.ts +0 -668
- package/src/lib/document/components/document-viewer/document-viewer.component.html +0 -50
- package/src/lib/document/components/document-viewer/document-viewer.component.scss +0 -187
- package/src/lib/document/components/document-viewer/document-viewer.component.spec.ts +0 -79
- package/src/lib/document/components/document-viewer/document-viewer.component.ts +0 -261
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.html +0 -48
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.scss +0 -320
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.spec.ts +0 -59
- package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.ts +0 -150
- package/src/lib/document/components/documents-menu/documents-menu.component.html +0 -44
- package/src/lib/document/components/documents-menu/documents-menu.component.scss +0 -363
- package/src/lib/document/components/documents-menu/documents-menu.component.spec.ts +0 -23
- package/src/lib/document/components/documents-menu/documents-menu.component.ts +0 -316
- package/src/lib/document/components/folder-block/folder-block.component.html +0 -46
- package/src/lib/document/components/folder-block/folder-block.component.scss +0 -9
- package/src/lib/document/components/folder-block/folder-block.component.spec.ts +0 -70
- package/src/lib/document/components/folder-container/folder-container.component.html +0 -56
- package/src/lib/document/components/folder-container/folder-container.component.scss +0 -20
- package/src/lib/document/components/folder-container/folder-container.component.spec.ts +0 -27
- package/src/lib/document/components/folder-container/folder-container.component.ts +0 -328
- package/src/lib/document/components/linked-document/linked-document.component.html +0 -23
- package/src/lib/document/components/linked-document/linked-document.component.scss +0 -10
- package/src/lib/document/components/linked-document/linked-document.component.spec.ts +0 -61
- package/src/lib/document/components/linked-document/linked-document.component.ts +0 -49
- package/src/lib/document/components/request-document/request-document.component.html +0 -86
- package/src/lib/document/components/request-document/request-document.component.scss +0 -16
- package/src/lib/document/components/request-document/request-document.component.ts +0 -278
- package/src/lib/document/components/sidebar/sidebar.component.html +0 -75
- package/src/lib/document/components/sidebar/sidebar.component.scss +0 -157
- package/src/lib/document/components/sidebar/sidebar.component.spec.ts +0 -114
- package/src/lib/document/components/sidebar/sidebar.component.ts +0 -223
- package/src/lib/document/components/user-list/user-list.component.html +0 -33
- package/src/lib/document/components/user-list/user-list.component.scss +0 -118
- package/src/lib/document/components/user-list/user-list.component.spec.ts +0 -23
- package/src/lib/document/components/user-list/user-list.component.ts +0 -181
- package/src/lib/document/constant/DOCUMENT_HISTORY.ts +0 -52
- package/src/lib/document/directives/document.directive.ts +0 -32
- package/src/lib/document/directives/permission.directive.spec.ts +0 -0
- package/src/lib/document/directives/permission.directive.ts +0 -72
- package/src/lib/document/document.module.ts +0 -351
- package/src/lib/document/models/document-category.model.ts +0 -30
- package/src/lib/document/models/document-history.model.ts +0 -109
- package/src/lib/document/models/document-list-response.model.ts +0 -37
- package/src/lib/document/models/document-type.model.ts +0 -44
- package/src/lib/document/models/document.model.ts +0 -53
- package/src/lib/document/models/status-data.model.ts +0 -31
- package/src/lib/document/models/uploaded-file-response.model.ts +0 -7
- package/src/lib/document/models/user-list.model.ts +0 -10
- package/src/lib/document/services/csv-parser.service.spec.ts +0 -97
- package/src/lib/document/services/csv-parser.service.ts +0 -303
- package/src/lib/document/services/document-actions.service.ts +0 -125
- package/src/lib/document/services/document-content-type.service.ts +0 -193
- package/src/lib/document/services/document-history-style.service.ts +0 -138
- package/src/lib/document/services/document-history.service.ts +0 -129
- package/src/lib/document/services/document-http.service.spec.ts +0 -119
- package/src/lib/document/services/document-http.service.ts +0 -497
- package/src/lib/document/services/document-list.service.ts +0 -195
- package/src/lib/document/services/document-menu.service.ts +0 -277
- package/src/lib/document/services/document-scroll.service.ts +0 -138
- package/src/lib/document/services/document-severity.service.ts +0 -98
- package/src/lib/document/services/document-table-builder.service.ts +0 -82
- package/src/lib/document/services/document-upload-business.service.ts +0 -326
- package/src/lib/document/services/document-upload-data.service.ts +0 -82
- package/src/lib/document/services/document-upload-form.service.ts +0 -149
- package/src/lib/document/services/document-upload.service.spec.ts +0 -99
- package/src/lib/document/services/document-upload.service.ts +0 -209
- package/src/lib/document/services/document-viewer.service.ts +0 -279
- package/src/lib/document/services/document-zoom.service.spec.ts +0 -56
- package/src/lib/document/services/document-zoom.service.ts +0 -164
- package/src/lib/document/services/document.service.ts +0 -356
- package/src/lib/document/services/eml-parser.service.ts +0 -444
- package/src/lib/document/services/excel-parser.service.spec.ts +0 -66
- package/src/lib/document/services/excel-parser.service.ts +0 -483
- package/src/lib/document/services/file-format.service.spec.ts +0 -16
- package/src/lib/document/services/file-format.service.ts +0 -63
- package/src/lib/document/services/status-calculator.service.ts +0 -44
- package/src/lib/document/services/user-list.service.ts +0 -77
- package/src/lib/document/state/document.query.ts +0 -378
- package/src/lib/document/state/document.state.ts +0 -100
- package/src/lib/document/state/document.store.ts +0 -200
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.scss
DELETED
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.control-container {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
gap: 0;
|
|
8
|
-
width: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Document name editing section
|
|
12
|
-
.document-name-display {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
gap: 0.25rem;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
padding: 0.75rem;
|
|
18
|
-
border-radius: 0.5rem;
|
|
19
|
-
transition: all 0.2s ease;
|
|
20
|
-
border: 1px solid transparent;
|
|
21
|
-
margin-right: auto;
|
|
22
|
-
|
|
23
|
-
&:hover {
|
|
24
|
-
background-color: transparent;
|
|
25
|
-
border-color: transparent;
|
|
26
|
-
transform: none;
|
|
27
|
-
box-shadow: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Highlighting for editable document names
|
|
31
|
-
&.clickable-doc-name {
|
|
32
|
-
&:hover {
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Non-editable document names remain neutral
|
|
37
|
-
&.non-clickable-doc-name {
|
|
38
|
-
cursor: default;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.alias-name {
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
color: #1e293b;
|
|
44
|
-
font-size: 1.125rem;
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
gap: 0.5rem;
|
|
48
|
-
line-height: 1.4;
|
|
49
|
-
|
|
50
|
-
.edit-icon-small {
|
|
51
|
-
font-size: 0.75rem;
|
|
52
|
-
color: #64748b;
|
|
53
|
-
opacity: 0.7;
|
|
54
|
-
transition: all 0.2s ease;
|
|
55
|
-
padding: 0.25rem;
|
|
56
|
-
border-radius: 0.25rem;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Only apply hover styles when document is editable
|
|
61
|
-
&.clickable-doc-name .alias-name:hover {
|
|
62
|
-
color: #1d4ed8;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.document-name {
|
|
66
|
-
font-size: 0.875rem;
|
|
67
|
-
color: #64748b;
|
|
68
|
-
font-weight: 400;
|
|
69
|
-
line-height: 1.3;
|
|
70
|
-
word-break: break-all;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Only show edit icon hover effects when document is editable
|
|
74
|
-
&.clickable-doc-name:hover .edit-icon-small {
|
|
75
|
-
opacity: 1;
|
|
76
|
-
color: #475569;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
// Inline editing style to match header-with-underline design
|
|
82
|
-
.document-edit-container {
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
gap: 0.375rem;
|
|
86
|
-
padding: 0;
|
|
87
|
-
background: transparent;
|
|
88
|
-
border-radius: 0;
|
|
89
|
-
border: none;
|
|
90
|
-
|
|
91
|
-
.document-name-input {
|
|
92
|
-
border: none !important;
|
|
93
|
-
border-bottom: 2px solid #3b82f6 !important;
|
|
94
|
-
border-radius: 0 !important;
|
|
95
|
-
padding: 0.25rem 0 !important;
|
|
96
|
-
font-size: 1.125rem !important;
|
|
97
|
-
font-weight: 600 !important;
|
|
98
|
-
color: #1e293b !important;
|
|
99
|
-
background: transparent !important;
|
|
100
|
-
transition: border-color 0.2s ease;
|
|
101
|
-
width: auto;
|
|
102
|
-
min-width: 12rem;
|
|
103
|
-
max-width: 100%;
|
|
104
|
-
box-shadow: none !important;
|
|
105
|
-
outline: none !important;
|
|
106
|
-
|
|
107
|
-
&:focus {
|
|
108
|
-
outline: none !important;
|
|
109
|
-
border-bottom-color: #1d4ed8 !important;
|
|
110
|
-
box-shadow: none !important;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&::placeholder {
|
|
114
|
-
color: #94a3b8;
|
|
115
|
-
font-weight: 400;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.document-name-subline {
|
|
120
|
-
font-size: 0.875rem;
|
|
121
|
-
color: #94a3b8;
|
|
122
|
-
padding-left: 0;
|
|
123
|
-
line-height: 1.3;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Ensure PrimeNG input styles don't reintroduce borders/shadows
|
|
128
|
-
:host ::ng-deep .document-name-input.p-inputtext,
|
|
129
|
-
:host ::ng-deep .document-name-input.p-inputtext:enabled:focus,
|
|
130
|
-
:host ::ng-deep .document-name-input.p-inputtext:focus {
|
|
131
|
-
border: none !important;
|
|
132
|
-
border-bottom: 2px solid #3b82f6 !important;
|
|
133
|
-
border-radius: 0 !important;
|
|
134
|
-
box-shadow: none !important;
|
|
135
|
-
outline: none !important;
|
|
136
|
-
background: transparent !important;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Neutralize PrimeNG hover styles
|
|
140
|
-
:host ::ng-deep .document-name-input.p-inputtext:hover,
|
|
141
|
-
:host ::ng-deep .document-name-input.p-inputtext:enabled:hover {
|
|
142
|
-
border: none !important;
|
|
143
|
-
border-bottom: 2px solid #1d4ed8 !important;
|
|
144
|
-
border-radius: 0 !important;
|
|
145
|
-
box-shadow: none !important;
|
|
146
|
-
outline: none !important;
|
|
147
|
-
background: transparent !important;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.error-message-wrapper {
|
|
151
|
-
color: #dc2626;
|
|
152
|
-
font-size: 0.875rem;
|
|
153
|
-
font-weight: 500;
|
|
154
|
-
padding: 0.5rem 0.75rem;
|
|
155
|
-
background-color: #fef2f2;
|
|
156
|
-
border: 1px solid #fecaca;
|
|
157
|
-
border-radius: 0.5rem;
|
|
158
|
-
margin-top: 0.25rem;
|
|
159
|
-
display: flex;
|
|
160
|
-
align-items: center;
|
|
161
|
-
gap: 0.5rem;
|
|
162
|
-
|
|
163
|
-
&::before {
|
|
164
|
-
content: "⚠";
|
|
165
|
-
font-size: 1rem;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Zoom controls section
|
|
170
|
-
.zoom-controls {
|
|
171
|
-
display: flex;
|
|
172
|
-
align-items: center;
|
|
173
|
-
gap: 0.75rem;
|
|
174
|
-
transition: all 0.2s ease;
|
|
175
|
-
margin-left: auto;
|
|
176
|
-
padding-right: 10px;
|
|
177
|
-
.zoom-button {
|
|
178
|
-
width: 44px;
|
|
179
|
-
height: 44px;
|
|
180
|
-
border-radius: 0.5rem;
|
|
181
|
-
border: none;
|
|
182
|
-
background: white;
|
|
183
|
-
color: #475569;
|
|
184
|
-
display: flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
justify-content: center;
|
|
187
|
-
cursor: pointer;
|
|
188
|
-
transition: all 0.2s ease;
|
|
189
|
-
font-size: 1.25rem;
|
|
190
|
-
font-weight: 600;
|
|
191
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
192
|
-
|
|
193
|
-
&:hover:not(:disabled) {
|
|
194
|
-
background: #3b82f6;
|
|
195
|
-
color: white;
|
|
196
|
-
transform: translateY(-2px);
|
|
197
|
-
box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
&:active:not(:disabled) {
|
|
201
|
-
transform: translateY(0);
|
|
202
|
-
box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
&:disabled {
|
|
206
|
-
opacity: 0.4;
|
|
207
|
-
cursor: not-allowed;
|
|
208
|
-
background: #f1f5f9;
|
|
209
|
-
color: #94a3b8;
|
|
210
|
-
transform: none;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
i {
|
|
214
|
-
font-size: 1rem;
|
|
215
|
-
transition: transform 0.2s ease;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&:hover:not(:disabled) i {
|
|
219
|
-
transform: scale(1.1);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.zoom-level {
|
|
224
|
-
min-width: 4.5rem;
|
|
225
|
-
text-align: center;
|
|
226
|
-
font-weight: 700;
|
|
227
|
-
color: #1e293b;
|
|
228
|
-
font-size: 1rem;
|
|
229
|
-
background: white;
|
|
230
|
-
padding: 0.75rem 1rem;
|
|
231
|
-
border-radius: 0.5rem;
|
|
232
|
-
border: 1px solid #e2e8f0;
|
|
233
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
234
|
-
transition: all 0.2s ease;
|
|
235
|
-
user-select: none;
|
|
236
|
-
|
|
237
|
-
&:hover {
|
|
238
|
-
background: #f8fafc;
|
|
239
|
-
border-color: #cbd5e1;
|
|
240
|
-
transform: translateY(-1px);
|
|
241
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.reset-button {
|
|
246
|
-
padding: 0.75rem 1.25rem;
|
|
247
|
-
border: 1px solid #cbd5e1;
|
|
248
|
-
background: white;
|
|
249
|
-
color: #64748b;
|
|
250
|
-
border-radius: 0.5rem;
|
|
251
|
-
font-size: 0.875rem;
|
|
252
|
-
font-weight: 500;
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
transition: all 0.2s ease;
|
|
255
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
256
|
-
white-space: nowrap;
|
|
257
|
-
|
|
258
|
-
&:hover {
|
|
259
|
-
background: #f8fafc;
|
|
260
|
-
border-color: #94a3b8;
|
|
261
|
-
color: #475569;
|
|
262
|
-
transform: translateY(-1px);
|
|
263
|
-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
&:active {
|
|
267
|
-
transform: translateY(0);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// Responsive design
|
|
273
|
-
@media (max-width: 768px) {
|
|
274
|
-
.control-container {
|
|
275
|
-
gap: 0.75rem;
|
|
276
|
-
flex-direction: column;
|
|
277
|
-
align-items: stretch;
|
|
278
|
-
justify-content: flex-start;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.document-name-display {
|
|
282
|
-
margin-right: 0;
|
|
283
|
-
margin-bottom: 0.5rem;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.zoom-controls {
|
|
287
|
-
margin-left: 0;
|
|
288
|
-
align-self: flex-end;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.zoom-controls {
|
|
292
|
-
padding: 0.75rem;
|
|
293
|
-
gap: 0.5rem;
|
|
294
|
-
flex-wrap: wrap;
|
|
295
|
-
justify-content: center;
|
|
296
|
-
|
|
297
|
-
.zoom-button {
|
|
298
|
-
width: 40px;
|
|
299
|
-
height: 40px;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.zoom-level {
|
|
303
|
-
min-width: 4rem;
|
|
304
|
-
padding: 0.5rem 0.75rem;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.reset-button {
|
|
308
|
-
padding: 0.5rem 1rem;
|
|
309
|
-
font-size: 0.8rem;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.document-name-display {
|
|
314
|
-
padding: 0.5rem;
|
|
315
|
-
|
|
316
|
-
.alias-name {
|
|
317
|
-
font-size: 1rem;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.spec.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { DocumentZoomControlsComponent } from './document-zoom-controls.component';
|
|
3
|
-
import { DocumentZoomService } from '../../services/document-zoom.service';
|
|
4
|
-
import { ButtonModule } from 'primeng/button';
|
|
5
|
-
|
|
6
|
-
describe('DocumentZoomControlsComponent', () => {
|
|
7
|
-
let component: DocumentZoomControlsComponent;
|
|
8
|
-
let fixture: ComponentFixture<DocumentZoomControlsComponent>;
|
|
9
|
-
let zoomService: jasmine.SpyObj<DocumentZoomService>;
|
|
10
|
-
|
|
11
|
-
beforeEach(async () => {
|
|
12
|
-
const spy = jasmine.createSpyObj('DocumentZoomService', ['zoomIn', 'zoomOut', 'resetZoom'], {
|
|
13
|
-
zoomLevel$: { subscribe: () => {} },
|
|
14
|
-
zoomConfig: { minZoom: 25, maxZoom: 400 }
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
await TestBed.configureTestingModule({
|
|
18
|
-
declarations: [DocumentZoomControlsComponent],
|
|
19
|
-
imports: [ButtonModule],
|
|
20
|
-
providers: [
|
|
21
|
-
{ provide: DocumentZoomService, useValue: spy }
|
|
22
|
-
]
|
|
23
|
-
}).compileComponents();
|
|
24
|
-
|
|
25
|
-
fixture = TestBed.createComponent(DocumentZoomControlsComponent);
|
|
26
|
-
component = fixture.componentInstance;
|
|
27
|
-
zoomService = TestBed.inject(DocumentZoomService) as jasmine.SpyObj<DocumentZoomService>;
|
|
28
|
-
fixture.detectChanges();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('should create', () => {
|
|
32
|
-
expect(component).toBeTruthy();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should call zoomIn when zoom in button is clicked', () => {
|
|
36
|
-
component.zoomIn();
|
|
37
|
-
expect(zoomService.zoomIn).toHaveBeenCalled();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('should call zoomOut when zoom out button is clicked', () => {
|
|
41
|
-
component.zoomOut();
|
|
42
|
-
expect(zoomService.zoomOut).toHaveBeenCalled();
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should call resetZoom when reset button is clicked', () => {
|
|
46
|
-
component.resetZoom();
|
|
47
|
-
expect(zoomService.resetZoom).toHaveBeenCalled();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it('should disable zoom out button when at minimum zoom', () => {
|
|
51
|
-
component.currentZoom = 25;
|
|
52
|
-
expect(component.isZoomOutDisabled).toBe(true);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('should disable zoom in button when at maximum zoom', () => {
|
|
56
|
-
component.currentZoom = 400;
|
|
57
|
-
expect(component.isZoomInDisabled).toBe(true);
|
|
58
|
-
});
|
|
59
|
-
});
|
package/src/lib/document/components/document-zoom-controls/document-zoom-controls.component.ts
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import { DocumentZoomService } from '../../services/document-zoom.service';
|
|
3
|
-
import { DocumentHttpService } from '../../services/document-http.service';
|
|
4
|
-
import { DocumentListItem } from '../../models/document-list-response.model';
|
|
5
|
-
import { Subscription } from 'rxjs';
|
|
6
|
-
import { SHARED } from '../../../../Shared/constant/SHARED';
|
|
7
|
-
import { ERRORS } from '../../../../Shared/constant/ERROR';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'document-zoom-controls',
|
|
11
|
-
templateUrl: './document-zoom-controls.component.html',
|
|
12
|
-
styleUrls: ['./document-zoom-controls.component.scss'],
|
|
13
|
-
standalone:false
|
|
14
|
-
})
|
|
15
|
-
export class DocumentZoomControlsComponent implements OnInit, OnDestroy {
|
|
16
|
-
@Input() selectedDocument?: DocumentListItem;
|
|
17
|
-
@Input() contextId?: string = SHARED.EMPTY;
|
|
18
|
-
@Input() isFormHide: boolean = false;
|
|
19
|
-
@Output() documentNameUpdated = new EventEmitter<void>();
|
|
20
|
-
|
|
21
|
-
currentZoom: number = 100;
|
|
22
|
-
private subscription: Subscription = new Subscription();
|
|
23
|
-
|
|
24
|
-
// Document name editing properties
|
|
25
|
-
isEditingDocumentName: boolean = false;
|
|
26
|
-
documentName: string = SHARED.EMPTY;
|
|
27
|
-
fileNameError: string = SHARED.EMPTY;
|
|
28
|
-
disallowedCharsRegex: RegExp = /[<>:"\/\\|?*]/;
|
|
29
|
-
|
|
30
|
-
constructor(
|
|
31
|
-
private zoomService: DocumentZoomService,
|
|
32
|
-
private documentHttpService: DocumentHttpService
|
|
33
|
-
) {}
|
|
34
|
-
|
|
35
|
-
ngOnInit(): void {
|
|
36
|
-
this.subscription.add(
|
|
37
|
-
this.zoomService.zoomLevel$.subscribe(zoom => {
|
|
38
|
-
this.currentZoom = zoom;
|
|
39
|
-
})
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
ngOnDestroy(): void {
|
|
44
|
-
this.subscription.unsubscribe();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get isZoomOutDisabled(): boolean {
|
|
48
|
-
return this.currentZoom <= this.zoomService.zoomConfig.minZoom;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get isZoomInDisabled(): boolean {
|
|
52
|
-
return this.currentZoom >= this.zoomService.zoomConfig.maxZoom;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
zoomIn(): void {
|
|
56
|
-
this.zoomService.zoomIn();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
zoomOut(): void {
|
|
60
|
-
this.zoomService.zoomOut();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
resetZoom(): void {
|
|
64
|
-
this.zoomService.resetZoom();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Document name editing methods
|
|
68
|
-
onDocumentNameClick(): void {
|
|
69
|
-
// Only allow editing if the document alias is editable
|
|
70
|
-
if (!this.selectedDocument?.isAliasEditable) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
this.isEditingDocumentName = true;
|
|
75
|
-
if (this.selectedDocument?.aliasName && this.selectedDocument.aliasName.trim() !== SHARED.EMPTY) {
|
|
76
|
-
this.documentName = this.selectedDocument.aliasName;
|
|
77
|
-
} else if (this.selectedDocument?.docName) {
|
|
78
|
-
const lastDotIndex = this.selectedDocument.docName.lastIndexOf('.');
|
|
79
|
-
if (lastDotIndex !== -1) {
|
|
80
|
-
this.documentName = this.selectedDocument.docName.substring(0, lastDotIndex);
|
|
81
|
-
} else {
|
|
82
|
-
this.documentName = this.selectedDocument.docName;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
const inputElement = document.querySelector('.document-name-input') as HTMLInputElement;
|
|
88
|
-
if (inputElement) {
|
|
89
|
-
inputElement.focus();
|
|
90
|
-
inputElement.select();
|
|
91
|
-
}
|
|
92
|
-
}, 100);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
cancelDocumentNameEdit(): void {
|
|
96
|
-
this.isEditingDocumentName = false;
|
|
97
|
-
this.fileNameError = SHARED.EMPTY;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
onDocumentNameChange(event: Event): void {
|
|
101
|
-
const input = event.target as HTMLInputElement;
|
|
102
|
-
this.documentName = input.value;
|
|
103
|
-
if (this.disallowedCharsRegex.test(this.documentName)) {
|
|
104
|
-
this.fileNameError = ERRORS.ERROR_FILE_NAME_INVALID_CHARACTERS;
|
|
105
|
-
} else if (this.documentName.trim() === SHARED.EMPTY) {
|
|
106
|
-
this.fileNameError = ERRORS.ERROR_FILE_NAME_EMPTY;
|
|
107
|
-
} else {
|
|
108
|
-
this.fileNameError = SHARED.EMPTY;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
handleSaveClick(): void {
|
|
113
|
-
if (!this.selectedDocument?._id) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
let hasChanged = false;
|
|
118
|
-
if (this.selectedDocument.aliasName && this.selectedDocument.aliasName.trim() !== SHARED.EMPTY) {
|
|
119
|
-
hasChanged = this.documentName !== this.selectedDocument.aliasName;
|
|
120
|
-
} else if (this.selectedDocument.docName) {
|
|
121
|
-
const docNameWithoutExtension = this.selectedDocument.docName.lastIndexOf(SHARED.DOT) !== -1
|
|
122
|
-
? this.selectedDocument.docName.substring(0, this.selectedDocument.docName.lastIndexOf(SHARED.DOT))
|
|
123
|
-
: this.selectedDocument.docName;
|
|
124
|
-
hasChanged = this.documentName !== docNameWithoutExtension;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (hasChanged && !this.fileNameError) {
|
|
128
|
-
const payload = { aliasName: this.documentName };
|
|
129
|
-
this.documentHttpService.updateDocumentName(this.selectedDocument._id, payload)
|
|
130
|
-
.subscribe({
|
|
131
|
-
next: (res: any) => {
|
|
132
|
-
if (res && res.aliasName) {
|
|
133
|
-
this.selectedDocument!.aliasName = res.aliasName;
|
|
134
|
-
} else {
|
|
135
|
-
this.selectedDocument!.aliasName = this.documentName;
|
|
136
|
-
}
|
|
137
|
-
this.isEditingDocumentName = false;
|
|
138
|
-
this.fileNameError = SHARED.EMPTY;
|
|
139
|
-
this.documentNameUpdated.emit();
|
|
140
|
-
},
|
|
141
|
-
error: (error: any) => {
|
|
142
|
-
this.fileNameError = error.message;
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
} else {
|
|
146
|
-
this.isEditingDocumentName = false;
|
|
147
|
-
this.fileNameError = SHARED.EMPTY;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<div class="document-sidebar-container">
|
|
2
|
-
<!-- Menu items are now used for navigation to specific sections, not for filtering documents -->
|
|
3
|
-
<p-card class="widget-menu-wrapper h-full">
|
|
4
|
-
@if(applicationNumber){
|
|
5
|
-
<div class="flex align-items-center justify-content-between widget-menu-header-wrapper">
|
|
6
|
-
<p class="mb-0 application-title-wrapper">ID - {{applicationNumber}}</p>
|
|
7
|
-
<div class="expand-icon-wrapper">
|
|
8
|
-
<i class="ri-arrow-left-s-line text-primary flex align-items-center justify-content-center w-full h-full"></i>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
<div class="widget-menu-container" >
|
|
14
|
-
<div class="widget-menu-wrapper h-ful l custom-scroll">
|
|
15
|
-
<p-menu [model]="categories" styleClass="w-full md:w-15rem">
|
|
16
|
-
<ng-template pTemplate="submenuheader" let-item>
|
|
17
|
-
<span [style]="{
|
|
18
|
-
color : '#9EA0B3'
|
|
19
|
-
}">{{ item.label }} Documents</span>
|
|
20
|
-
</ng-template>
|
|
21
|
-
<ng-template pTemplate="item" let-item>
|
|
22
|
-
<a pRipple
|
|
23
|
-
class="flex align-items-center p-menuitem-link"
|
|
24
|
-
[class.selected-menu-item]="selectedMenuItemId === item._id"
|
|
25
|
-
[class.disabled-menu-item]="item.isSelectable === false"
|
|
26
|
-
[class.pointer-events-none]="item.isSelectable === false"
|
|
27
|
-
[style.opacity]="item.isSelectable === false ? '0.5' : '1'"
|
|
28
|
-
[style.cursor]="item.isSelectable === false ? 'not-allowed' : 'pointer'"
|
|
29
|
-
(click)="onMenuItemClick($event, item)">
|
|
30
|
-
<span [class]="item.icon" class="text-xl"></span>
|
|
31
|
-
<span class="ml-2">{{ item.label }}</span>
|
|
32
|
-
<p-badge *ngIf="item.menuData?.shouldShowBadge"
|
|
33
|
-
class="ml-auto"
|
|
34
|
-
[severity]="item.menuData?.badgeSeverity"
|
|
35
|
-
[value]="item.menuData?.badgeValue" />
|
|
36
|
-
</a>
|
|
37
|
-
</ng-template>
|
|
38
|
-
</p-menu>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</p-card>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
|