@beterdichtbij/component-library 0.35.1 → 0.36.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.
@@ -0,0 +1,11 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<Readonly<{
2
+ loadingText?: any;
3
+ downloadText?: any;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
5
+ loadingText?: any;
6
+ downloadText?: any;
7
+ }>>>, {
8
+ readonly loadingText?: any;
9
+ readonly downloadText?: any;
10
+ }, {}>;
11
+ export default _sfc_main;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BDImageAttachmentModal.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/BDImageAttachmentModal/BDImageAttachmentModal.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mIAAmI,CAAC;AAC1J,cAAc,mIAAmI,CAAC;AAClJ,eAAe,SAAS,CAAC"}
@@ -0,0 +1,15 @@
1
+ export default function useZoom(): {
2
+ zoom: import("vue").Ref<number>;
3
+ mouseDown: import("vue").Ref<boolean>;
4
+ imageHolderRef: import("vue").Ref<HTMLElement | null>;
5
+ pos: import("vue").Ref<{
6
+ top: number;
7
+ left: number;
8
+ x: number;
9
+ y: number;
10
+ }>;
11
+ SetZoom: import("vue").ComputedRef<string>;
12
+ OnMouseDown: (e: MouseEvent) => void;
13
+ OnMouseMove: (e: MouseEvent) => void;
14
+ OnMouseUp: () => void;
15
+ };
package/dist/index.d.ts CHANGED
@@ -30,16 +30,18 @@ import BDAttachmentPreviewList from "./components/molecules/BDAttachmentPreviewL
30
30
  import BDImageAttachmentPreviewList from "./components/molecules/BDImageAttachmentPreviewList/BDImageAttachmentPreviewList.vue";
31
31
  import BDChatCloud from "./components/molecules/BDChatCloud/BDChatCloud.vue";
32
32
  import BDTable from "./components/molecules/BDTable/BDTable.vue";
33
+ import BDChangePasswordTemplate from "./components/organisms/BDChangePasswordTemplate/BDChangePasswordTemplate.vue";
33
34
  import BDDropdown from "./components/organisms/BDDropdown/BDDropdown.vue";
34
35
  import BDHeader from "./components/organisms/BDHeader/BDHeader.vue";
36
+ import BDImageAttachmentModal from "./components/organisms/BDImageAttachmentModal/BDImageAttachmentModal.vue";
35
37
  import BDModal from "./components/organisms/BDModal/BDModal.vue";
36
- import BDChangePasswordTemplate from "./components/organisms/BDChangePasswordTemplate/BDChangePasswordTemplate.vue";
37
38
  import { useModal } from "./composables/useModal";
38
39
  import { useServerErrors } from "./composables/useServerErrors";
39
40
  import { useToaster } from "./composables/useToaster";
40
41
  import { useValidation } from "./composables/useValidation";
42
+ import useZoom from "./composables/useZoom";
41
43
  import { vBdTooltip } from "./directives/BDTooltip";
42
44
  import { type ChangePasswordData } from './types/ChangePasswordData';
43
45
  import { type ValidationChangePasswordData } from './types/ValidationChangePasswordData';
44
46
  import { getDisplayDate } from "./utils/display-date";
45
- export { BDChatCloud, BDCol, BDContainer, BDRow, BDButton, BDLogo, BDLink, BDDropdownItem, BDDropdown, BDAlert, BDProfileImage, BDZoomslider, BDCard, BDChangePasswordTemplate, BDCollapsableCard, BDModal, BDFormInput, BDFormInvalidFeedback, BDInputGroup, BDBadge, BDForm, BDPagination, BDDropzone, BDMarkdownEditor, BDFormSelect, BDFormCheckbox, BDArticle, BDUser, BDToast, BDAttachmentPreviewList, BDImageAttachmentPreviewList, BDHeader, BDMobileMenu, BDTable, BDPill, IconAcademy, IconArrowDown, IconArrowUp, IconAttachment, IconBold, IconBulletList, IconCalendar, IconCardView, IconCaretDown, IconCaretLeft, IconCaretRight, IconCheck, IconClose, IconComment, IconDownloadImage, IconEdit, IconError, IconEyeShow, IconEyeSlash, IconFile, IconHyperlink, IconInfo, IconItalic, IconListView, IconMenu, IconOrderedList, IconRemove, IconService, IconSort, IconSortAsc, IconSortDesc, IconSortNone, IconTriangleExclamation, IconUnderline, IconContactPerson, ChangePasswordData, ValidationChangePasswordData, useModal, useServerErrors, useToaster, useValidation, vBdTooltip, getDisplayDate, };
47
+ export { BDChatCloud, BDCol, BDContainer, BDRow, BDButton, BDLogo, BDLink, BDDropdownItem, BDDropdown, BDAlert, BDProfileImage, BDZoomslider, BDCard, BDChangePasswordTemplate, BDCollapsableCard, BDModal, BDFormInput, BDFormInvalidFeedback, BDInputGroup, BDBadge, BDForm, BDPagination, BDDropzone, BDMarkdownEditor, BDFormSelect, BDFormCheckbox, BDArticle, BDUser, BDToast, BDAttachmentPreviewList, BDImageAttachmentPreviewList, BDHeader, BDMobileMenu, BDTable, BDPill, BDImageAttachmentModal, IconAcademy, IconArrowDown, IconArrowUp, IconAttachment, IconBold, IconBulletList, IconCalendar, IconCardView, IconCaretDown, IconCaretLeft, IconCaretRight, IconCheck, IconClose, IconComment, IconDownloadImage, IconEdit, IconError, IconEyeShow, IconEyeSlash, IconFile, IconHyperlink, IconInfo, IconItalic, IconListView, IconMenu, IconOrderedList, IconRemove, IconService, IconSort, IconSortAsc, IconSortDesc, IconSortNone, IconTriangleExclamation, IconUnderline, IconContactPerson, ChangePasswordData, ValidationChangePasswordData, useModal, useServerErrors, useToaster, useValidation, useZoom, vBdTooltip, getDisplayDate, };
@@ -30,6 +30,7 @@
30
30
  display: inline-block;
31
31
  padding: 4px;
32
32
  border-radius: 50%;
33
+
33
34
  path {
34
35
  fill: $color-white;
35
36
  }
@@ -44,7 +45,7 @@
44
45
  }
45
46
 
46
47
  @include media-breakpoint-up(md) {
47
- padding: 30px 65px 0px 65px;
48
+ padding: 30px 65px 15px 65px;
48
49
  }
49
50
 
50
51
  @include media-breakpoint-down(md) {
@@ -73,9 +74,19 @@
73
74
 
74
75
  .modal-body {
75
76
  @include media-breakpoint-up(md) {
76
- padding: 30px 65px;
77
+ padding: 15px 65px 30px 65px;
77
78
  }
78
79
  border: 0px;
80
+
81
+ p:last-of-type {
82
+ margin-bottom: 0;
83
+ }
84
+ }
85
+
86
+ &:has(.modal-footer) .modal-body {
87
+ @include media-breakpoint-up(md) {
88
+ padding: 15px 65px;
89
+ }
79
90
  }
80
91
 
81
92
  .modal-footer {
@@ -94,7 +105,7 @@
94
105
  }
95
106
 
96
107
  @include media-breakpoint-up(md) {
97
- padding: 30px 65px;
108
+ padding: 15px 65px 30px 65px;
98
109
  }
99
110
 
100
111
  @include media-breakpoint-down(md) {
@@ -140,4 +151,97 @@
140
151
  }
141
152
  }
142
153
  }
154
+ }
155
+
156
+ #image-attachment-modal {
157
+ &.modal-lg {
158
+ --bs-modal-width: 1200px;
159
+ }
160
+
161
+ .image-preview-image-holder {
162
+ width: 100%;
163
+ height: 100%;
164
+ overflow: auto;
165
+ cursor: grab;
166
+ -webkit-touch-callout: none;
167
+ -webkit-user-select: none;
168
+ -khtml-user-select: none;
169
+ -moz-user-select: none;
170
+ -ms-user-select: none;
171
+ user-select: none;
172
+ margin-left: auto;
173
+ margin-right: auto;
174
+
175
+ .image-preview-modal {
176
+ margin: 0px auto;
177
+ display: block;
178
+ user-select: none;
179
+ width: auto;
180
+ height: auto;
181
+ max-width: 600px;
182
+ max-height: 400px;
183
+ transition: transform .2s;
184
+ transform-origin: top;
185
+ z-index: 1;
186
+
187
+ @include media-breakpoint-down(sm) {
188
+ max-width: 300px;
189
+ max-height: 200px;
190
+ }
191
+
192
+ // Zoom didn't work when the styling was incorporated into the Vue component.
193
+ &.zoom {
194
+ &-1 {
195
+ transform: scale(1.25);
196
+ }
197
+
198
+ &-2 {
199
+ transform: scale(1.5);
200
+ }
201
+
202
+ &-3 {
203
+ transform: scale(1.75);
204
+ }
205
+
206
+ &-4 {
207
+ transform: scale(2);
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ .image-preview-bd-zoom-slider, .download-image {
214
+ width: 250px;
215
+ margin-left: auto;
216
+ margin-right: auto;
217
+ margin-top: 50px;
218
+ z-index: 2;
219
+ }
220
+
221
+ .download-image {
222
+ width: 250px;
223
+ display: block;
224
+ margin-left: auto;
225
+ margin-right: auto;
226
+ margin-top: 30px;
227
+ margin-bottom: 30px;
228
+ z-index: 3;
229
+ }
230
+
231
+ .show-spinner {
232
+ width: 100px;
233
+ height: 50px;
234
+ display: flex;
235
+ justify-content: center;
236
+ align-items: center;
237
+ margin: auto;
238
+ }
239
+
240
+ .modal-footer {
241
+ display: none;
242
+ }
243
+
244
+ a {
245
+ text-decoration: none;
246
+ }
143
247
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beterdichtbij/component-library",
3
3
  "private": false,
4
- "version": "0.35.1",
4
+ "version": "0.36.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"