@leavittsoftware/web 1.0.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.
- package/leavitt/api-service/HttpError.d.ts +10 -0
- package/leavitt/api-service/HttpError.js +2 -0
- package/leavitt/api-service/HttpError.js.map +1 -0
- package/leavitt/api-service/api-service.d.ts +27 -0
- package/leavitt/api-service/api-service.js +332 -0
- package/leavitt/api-service/api-service.js.map +1 -0
- package/leavitt/api-service/api2-service.d.ts +338 -0
- package/leavitt/api-service/api2-service.js +17 -0
- package/leavitt/api-service/api2-service.js.map +1 -0
- package/leavitt/api-service/authenticated-token-provider.d.ts +5 -0
- package/leavitt/api-service/authenticated-token-provider.js +7 -0
- package/leavitt/api-service/authenticated-token-provider.js.map +1 -0
- package/leavitt/api-service/bearer-token-provider.d.ts +4 -0
- package/leavitt/api-service/bearer-token-provider.js +2 -0
- package/leavitt/api-service/bearer-token-provider.js.map +1 -0
- package/leavitt/api-service/mapi-service.d.ts +338 -0
- package/leavitt/api-service/mapi-service.js +17 -0
- package/leavitt/api-service/mapi-service.js.map +1 -0
- package/leavitt/api-service/no-authentication-token-provider.d.ts +5 -0
- package/leavitt/api-service/no-authentication-token-provider.js +6 -0
- package/leavitt/api-service/no-authentication-token-provider.js.map +1 -0
- package/leavitt/api-service/odata-dto.d.ts +6 -0
- package/leavitt/api-service/odata-dto.js +7 -0
- package/leavitt/api-service/odata-dto.js.map +1 -0
- package/leavitt/api-service/odata-model-info.d.ts +5 -0
- package/leavitt/api-service/odata-model-info.js +7 -0
- package/leavitt/api-service/odata-model-info.js.map +1 -0
- package/leavitt/api-service/odata-response.d.ts +15 -0
- package/leavitt/api-service/odata-response.js +50 -0
- package/leavitt/api-service/odata-response.js.map +1 -0
- package/leavitt/api-service/status-codes.d.ts +2 -0
- package/leavitt/api-service/status-codes.js +44 -0
- package/leavitt/api-service/status-codes.js.map +1 -0
- package/leavitt/company-select/company-select.d.ts +50 -0
- package/leavitt/company-select/company-select.js +157 -0
- package/leavitt/company-select/company-select.js.map +1 -0
- package/leavitt/person-company-select/person-company-select.d.ts +41 -0
- package/leavitt/person-company-select/person-company-select.js +180 -0
- package/leavitt/person-company-select/person-company-select.js.map +1 -0
- package/leavitt/person-group-select/people-group-icons.d.ts +5 -0
- package/leavitt/person-group-select/people-group-icons.js +66 -0
- package/leavitt/person-group-select/people-group-icons.js.map +1 -0
- package/leavitt/person-group-select/person-group-select.d.ts +41 -0
- package/leavitt/person-group-select/person-group-select.js +186 -0
- package/leavitt/person-group-select/person-group-select.js.map +1 -0
- package/leavitt/person-select/person-select.d.ts +33 -0
- package/leavitt/person-select/person-select.js +128 -0
- package/leavitt/person-select/person-select.js.map +1 -0
- package/leavitt/profile-picture/profile-picture-menu.d.ts +44 -0
- package/leavitt/profile-picture/profile-picture-menu.js +197 -0
- package/leavitt/profile-picture/profile-picture-menu.js.map +1 -0
- package/leavitt/profile-picture/profile-picture.d.ts +39 -0
- package/leavitt/profile-picture/profile-picture.js +151 -0
- package/leavitt/profile-picture/profile-picture.js.map +1 -0
- package/leavitt/user-feedback/user-feedback.d.ts +357 -0
- package/leavitt/user-feedback/user-feedback.js +207 -0
- package/leavitt/user-feedback/user-feedback.js.map +1 -0
- package/leavitt/user-manager/LssJwtToken.d.ts +21 -0
- package/leavitt/user-manager/LssJwtToken.js +2 -0
- package/leavitt/user-manager/LssJwtToken.js.map +1 -0
- package/leavitt/user-manager/user-manager-events.d.ts +5 -0
- package/leavitt/user-manager/user-manager-events.js +7 -0
- package/leavitt/user-manager/user-manager-events.js.map +1 -0
- package/leavitt/user-manager/user-manager.d.ts +37 -0
- package/leavitt/user-manager/user-manager.js +364 -0
- package/leavitt/user-manager/user-manager.js.map +1 -0
- package/package.json +36 -0
- package/titanium/access-denied-page/access-denied-page.d.ts +16 -0
- package/titanium/access-denied-page/access-denied-page.js +360 -0
- package/titanium/access-denied-page/access-denied-page.js.map +1 -0
- package/titanium/address-input/Address.js.map +1 -0
- package/titanium/address-input/address-input.d.ts +29 -0
- package/titanium/address-input/address-input.js +77 -0
- package/titanium/address-input/address-input.js.map +1 -0
- package/titanium/address-input/google-address-input.d.ts +30 -0
- package/titanium/address-input/google-address-input.js +202 -0
- package/titanium/address-input/google-address-input.js.map +1 -0
- package/titanium/address-input/manual-address-dialog.d.ts +30 -0
- package/titanium/address-input/manual-address-dialog.js +250 -0
- package/titanium/address-input/manual-address-dialog.js.map +1 -0
- package/titanium/address-input/types/address-input-address.d.ts +17 -0
- package/titanium/address-input/types/address-input-address.js +2 -0
- package/titanium/address-input/types/address-input-address.js.map +1 -0
- package/titanium/address-input/types/address.js.map +1 -0
- package/titanium/address-input/types/autocomplete-prediction-suggestion.js.map +1 -0
- package/titanium/address-input/utils/address-to-string.d.ts +3 -0
- package/titanium/address-input/utils/address-to-string.js +13 -0
- package/titanium/address-input/utils/address-to-string.js.map +1 -0
- package/titanium/address-input/utils/place-result-to-address.d.ts +4 -0
- package/titanium/address-input/utils/place-result-to-address.js +33 -0
- package/titanium/address-input/utils/place-result-to-address.js.map +1 -0
- package/titanium/address-input/utils/validate-street.d.ts +2 -0
- package/titanium/address-input/utils/validate-street.js +8 -0
- package/titanium/address-input/utils/validate-street.js.map +1 -0
- package/titanium/card/card.d.ts +23 -0
- package/titanium/card/card.js +160 -0
- package/titanium/card/card.js.map +1 -0
- package/titanium/chip-multi-select/chip-multi-select.d.ts +55 -0
- package/titanium/chip-multi-select/chip-multi-select.js +119 -0
- package/titanium/chip-multi-select/chip-multi-select.js.map +1 -0
- package/titanium/data-table/data-table-header.d.ts +67 -0
- package/titanium/data-table/data-table-header.js +207 -0
- package/titanium/data-table/data-table-header.js.map +1 -0
- package/titanium/data-table/data-table-item.d.ts +100 -0
- package/titanium/data-table/data-table-item.js +511 -0
- package/titanium/data-table/data-table-item.js.map +1 -0
- package/titanium/data-table/data-table.d.ts +146 -0
- package/titanium/data-table/data-table.js +605 -0
- package/titanium/data-table/data-table.js.map +1 -0
- package/titanium/data-table/filter-controller.d.ts +23 -0
- package/titanium/data-table/filter-controller.js +119 -0
- package/titanium/data-table/filter-controller.js.map +1 -0
- package/titanium/data-table/filter.d.ts +8 -0
- package/titanium/data-table/filter.js +11 -0
- package/titanium/data-table/filter.js.map +1 -0
- package/titanium/data-table/page-control.d.ts +54 -0
- package/titanium/data-table/page-control.js +196 -0
- package/titanium/data-table/page-control.js.map +1 -0
- package/titanium/date-range-selector/date-range-change-event.d.ts +8 -0
- package/titanium/date-range-selector/date-range-change-event.js +10 -0
- package/titanium/date-range-selector/date-range-change-event.js.map +1 -0
- package/titanium/date-range-selector/date-range-selector.d.ts +65 -0
- package/titanium/date-range-selector/date-range-selector.js +423 -0
- package/titanium/date-range-selector/date-range-selector.js.map +1 -0
- package/titanium/date-range-selector/range-label.d.ts +4 -0
- package/titanium/date-range-selector/range-label.js +25 -0
- package/titanium/date-range-selector/range-label.js.map +1 -0
- package/titanium/drawer/drawer.d.ts +39 -0
- package/titanium/drawer/drawer.js +233 -0
- package/titanium/drawer/drawer.js.map +1 -0
- package/titanium/duration-input/duration-input.d.ts +26 -0
- package/titanium/duration-input/duration-input.js +86 -0
- package/titanium/duration-input/duration-input.js.map +1 -0
- package/titanium/duration-input/human-interval.d.ts +19 -0
- package/titanium/duration-input/human-interval.js +74 -0
- package/titanium/duration-input/human-interval.js.map +1 -0
- package/titanium/error-page/error-page.d.ts +16 -0
- package/titanium/error-page/error-page.js +96 -0
- package/titanium/error-page/error-page.js.map +1 -0
- package/titanium/event-bus/event-bus.d.ts +10 -0
- package/titanium/event-bus/event-bus.js +52 -0
- package/titanium/event-bus/event-bus.js.map +1 -0
- package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.d.ts +160 -0
- package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js +295 -0
- package/titanium/extendable-outlined-text-field/extendable-outlined-text-field.js.map +1 -0
- package/titanium/extendable-outlined-text-field/extensible-outlined-text-field.d.ts +45 -0
- package/titanium/extendable-outlined-text-field/extensible-outlined-text-field.js.map +1 -0
- package/titanium/full-page-loading-indicator/full-page-loading-indicator.d.ts +19 -0
- package/titanium/full-page-loading-indicator/full-page-loading-indicator.js +170 -0
- package/titanium/full-page-loading-indicator/full-page-loading-indicator.js.map +1 -0
- package/titanium/hacks/dialog-overflow-hacks.d.ts +4 -0
- package/titanium/hacks/dialog-overflow-hacks.js +21 -0
- package/titanium/hacks/dialog-overflow-hacks.js.map +1 -0
- package/titanium/header/header.d.ts +39 -0
- package/titanium/header/header.js +148 -0
- package/titanium/header/header.js.map +1 -0
- package/titanium/helpers/csv-download.d.ts +3 -0
- package/titanium/helpers/csv-download.js +78 -0
- package/titanium/helpers/csv-download.js.map +1 -0
- package/titanium/helpers/debouncer.d.ts +13 -0
- package/titanium/helpers/debouncer.js +33 -0
- package/titanium/helpers/debouncer.js.map +1 -0
- package/titanium/helpers/delay.d.ts +2 -0
- package/titanium/helpers/delay.js +6 -0
- package/titanium/helpers/delay.js.map +1 -0
- package/titanium/helpers/dev-detection.d.ts +3 -0
- package/titanium/helpers/dev-detection.js +12 -0
- package/titanium/helpers/dev-detection.js.map +1 -0
- package/titanium/helpers/helpers.d.ts +14 -0
- package/titanium/helpers/helpers.js +14 -0
- package/titanium/helpers/helpers.js.map +1 -0
- package/titanium/helpers/join.d.ts +2 -0
- package/titanium/helpers/join.js +5 -0
- package/titanium/helpers/join.js.map +1 -0
- package/titanium/helpers/leavitt-cdn.d.ts +5 -0
- package/titanium/helpers/leavitt-cdn.js +38 -0
- package/titanium/helpers/leavitt-cdn.js.map +1 -0
- package/titanium/helpers/load-while.d.ts +343 -0
- package/titanium/helpers/load-while.js +27 -0
- package/titanium/helpers/load-while.js.map +1 -0
- package/titanium/helpers/media-query.d.ts +2 -0
- package/titanium/helpers/media-query.js +6 -0
- package/titanium/helpers/media-query.js.map +1 -0
- package/titanium/helpers/middle-ellipsis.d.ts +2 -0
- package/titanium/helpers/middle-ellipsis.js +7 -0
- package/titanium/helpers/middle-ellipsis.js.map +1 -0
- package/titanium/helpers/not-null-or-undefined.d.ts +2 -0
- package/titanium/helpers/not-null-or-undefined.js +4 -0
- package/titanium/helpers/not-null-or-undefined.js.map +1 -0
- package/titanium/helpers/not-null.d.ts +2 -0
- package/titanium/helpers/not-null.js +4 -0
- package/titanium/helpers/not-null.js.map +1 -0
- package/titanium/helpers/not-undefined.d.ts +2 -0
- package/titanium/helpers/not-undefined.js +4 -0
- package/titanium/helpers/not-undefined.js.map +1 -0
- package/titanium/helpers/odata-helpers.d.ts +2 -0
- package/titanium/helpers/odata-helpers.js +2 -0
- package/titanium/helpers/odata-helpers.js.map +1 -0
- package/titanium/helpers/search-token.d.ts +2 -0
- package/titanium/helpers/search-token.js +17 -0
- package/titanium/helpers/search-token.js.map +1 -0
- package/titanium/icon-picker/icon-picker.d.ts +23 -0
- package/titanium/icon-picker/icon-picker.js +75 -0
- package/titanium/icon-picker/icon-picker.js.map +1 -0
- package/titanium/icon-picker/material-symbols.d.ts +3 -0
- package/titanium/icon-picker/material-symbols.js +3297 -0
- package/titanium/icon-picker/material-symbols.js.map +1 -0
- package/titanium/input-validator/input-validator.d.ts +20 -0
- package/titanium/input-validator/input-validator.js +45 -0
- package/titanium/input-validator/input-validator.js.map +1 -0
- package/titanium/search-input/search-input.d.ts +47 -0
- package/titanium/search-input/search-input.js +237 -0
- package/titanium/search-input/search-input.js.map +1 -0
- package/titanium/service-worker-notifier/service-worker-notifier.d.ts +9 -0
- package/titanium/service-worker-notifier/service-worker-notifier.js +57 -0
- package/titanium/service-worker-notifier/service-worker-notifier.js.map +1 -0
- package/titanium/show-hide/show-hide.d.ts +36 -0
- package/titanium/show-hide/show-hide.js +144 -0
- package/titanium/show-hide/show-hide.js.map +1 -0
- package/titanium/single-select-base/single-select-base.d.ts +449 -0
- package/titanium/single-select-base/single-select-base.js +411 -0
- package/titanium/single-select-base/single-select-base.js.map +1 -0
- package/titanium/smart-attachment-input/crop-and-save-image-dialog.d.ts +370 -0
- package/titanium/smart-attachment-input/crop-and-save-image-dialog.js +270 -0
- package/titanium/smart-attachment-input/crop-and-save-image-dialog.js.map +1 -0
- package/titanium/smart-attachment-input/cropper-styles.d.ts +3 -0
- package/titanium/smart-attachment-input/cropper-styles.js +311 -0
- package/titanium/smart-attachment-input/cropper-styles.js.map +1 -0
- package/titanium/smart-attachment-input/image-formats.d.ts +5 -0
- package/titanium/smart-attachment-input/image-formats.js +37 -0
- package/titanium/smart-attachment-input/image-formats.js.map +1 -0
- package/titanium/smart-attachment-input/image-preview-dialog.d.ts +21 -0
- package/titanium/smart-attachment-input/image-preview-dialog.js +83 -0
- package/titanium/smart-attachment-input/image-preview-dialog.js.map +1 -0
- package/titanium/smart-attachment-input/smart-attachment-input.d.ts +126 -0
- package/titanium/smart-attachment-input/smart-attachment-input.js +422 -0
- package/titanium/smart-attachment-input/smart-attachment-input.js.map +1 -0
- package/titanium/smart-attachment-input/type/smart-attachment.d.ts +7 -0
- package/titanium/smart-attachment-input/type/smart-attachment.js +2 -0
- package/titanium/smart-attachment-input/type/smart-attachment.js.map +1 -0
- package/titanium/snackbar/snackbar.d.ts +79 -0
- package/titanium/snackbar/snackbar.js +302 -0
- package/titanium/snackbar/snackbar.js.map +1 -0
- package/titanium/styles/a.d.ts +2 -0
- package/titanium/styles/a.js +18 -0
- package/titanium/styles/a.js.map +1 -0
- package/titanium/styles/data-row.d.ts +2 -0
- package/titanium/styles/data-row.js +52 -0
- package/titanium/styles/data-row.js.map +1 -0
- package/titanium/styles/ellipsis.d.ts +2 -0
- package/titanium/styles/ellipsis.js +9 -0
- package/titanium/styles/ellipsis.js.map +1 -0
- package/titanium/styles/h1.d.ts +2 -0
- package/titanium/styles/h1.js +17 -0
- package/titanium/styles/h1.js.map +1 -0
- package/titanium/styles/h2.d.ts +2 -0
- package/titanium/styles/h2.js +17 -0
- package/titanium/styles/h2.js.map +1 -0
- package/titanium/styles/h3.d.ts +2 -0
- package/titanium/styles/h3.js +17 -0
- package/titanium/styles/h3.js.map +1 -0
- package/titanium/styles/h4.d.ts +2 -0
- package/titanium/styles/h4.js +17 -0
- package/titanium/styles/h4.js.map +1 -0
- package/titanium/styles/h5.d.ts +2 -0
- package/titanium/styles/h5.js +19 -0
- package/titanium/styles/h5.js.map +1 -0
- package/titanium/styles/p.d.ts +2 -0
- package/titanium/styles/p.js +17 -0
- package/titanium/styles/p.js.map +1 -0
- package/titanium/styles/styles.d.ts +17 -0
- package/titanium/styles/styles.js +17 -0
- package/titanium/styles/styles.js.map +1 -0
- package/titanium/toolbar/toolbar.d.ts +34 -0
- package/titanium/toolbar/toolbar.js +104 -0
- package/titanium/toolbar/toolbar.js.map +1 -0
- package/titanium/types/any-function.d.ts +5 -0
- package/titanium/types/any-function.js +2 -0
- package/titanium/types/any-function.js.map +1 -0
- package/titanium/types/dom-event.d.ts +4 -0
- package/titanium/types/dom-event.js +2 -0
- package/titanium/types/dom-event.js.map +1 -0
- package/titanium/types/identifier-interface.d.ts +4 -0
- package/titanium/types/identifier-interface.js +2 -0
- package/titanium/types/identifier-interface.js.map +1 -0
- package/titanium/types/pending-state-event.d.ts +7 -0
- package/titanium/types/pending-state-event.js +7 -0
- package/titanium/types/pending-state-event.js.map +1 -0
- package/titanium/types/string-map.d.ts +7 -0
- package/titanium/types/string-map.js +5 -0
- package/titanium/types/string-map.js.map +1 -0
- package/titanium/youtube-input/youtube-input.d.ts +17 -0
- package/titanium/youtube-input/youtube-input.js +52 -0
- package/titanium/youtube-input/youtube-input.js.map +1 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
/** Update when upgrading CropperJS */
|
|
3
|
+
export const cropperCSS = css `
|
|
4
|
+
.cropper-container {
|
|
5
|
+
direction: ltr;
|
|
6
|
+
font-size: 0;
|
|
7
|
+
line-height: 0;
|
|
8
|
+
position: relative;
|
|
9
|
+
-ms-touch-action: none;
|
|
10
|
+
touch-action: none;
|
|
11
|
+
-webkit-user-select: none;
|
|
12
|
+
-moz-user-select: none;
|
|
13
|
+
-ms-user-select: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cropper-container img {
|
|
18
|
+
display: block;
|
|
19
|
+
height: 100%;
|
|
20
|
+
image-orientation: 0deg;
|
|
21
|
+
max-height: none !important;
|
|
22
|
+
max-width: none !important;
|
|
23
|
+
min-height: 0 !important;
|
|
24
|
+
min-width: 0 !important;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cropper-wrap-box,
|
|
29
|
+
.cropper-canvas,
|
|
30
|
+
.cropper-drag-box,
|
|
31
|
+
.cropper-crop-box,
|
|
32
|
+
.cropper-modal {
|
|
33
|
+
bottom: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
position: absolute;
|
|
36
|
+
right: 0;
|
|
37
|
+
top: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.cropper-wrap-box,
|
|
41
|
+
.cropper-canvas {
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.cropper-drag-box {
|
|
46
|
+
background-color: #fff;
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.cropper-modal {
|
|
51
|
+
background-color: #000;
|
|
52
|
+
opacity: 0.5;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.cropper-view-box {
|
|
56
|
+
display: block;
|
|
57
|
+
height: 100%;
|
|
58
|
+
outline: 1px solid #39f;
|
|
59
|
+
outline-color: rgba(51, 153, 255, 0.75);
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cropper-dashed {
|
|
65
|
+
border: 0 dashed #eee;
|
|
66
|
+
display: block;
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
position: absolute;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.cropper-dashed.dashed-h {
|
|
72
|
+
border-bottom-width: 1px;
|
|
73
|
+
border-top-width: 1px;
|
|
74
|
+
height: calc(100% / 3);
|
|
75
|
+
left: 0;
|
|
76
|
+
top: calc(100% / 3);
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.cropper-dashed.dashed-v {
|
|
81
|
+
border-left-width: 1px;
|
|
82
|
+
border-right-width: 1px;
|
|
83
|
+
height: 100%;
|
|
84
|
+
left: calc(100% / 3);
|
|
85
|
+
top: 0;
|
|
86
|
+
width: calc(100% / 3);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cropper-center {
|
|
90
|
+
display: block;
|
|
91
|
+
height: 0;
|
|
92
|
+
left: 50%;
|
|
93
|
+
opacity: 0.75;
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 50%;
|
|
96
|
+
width: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.cropper-center::before,
|
|
100
|
+
.cropper-center::after {
|
|
101
|
+
background-color: #eee;
|
|
102
|
+
content: ' ';
|
|
103
|
+
display: block;
|
|
104
|
+
position: absolute;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cropper-center::before {
|
|
108
|
+
height: 1px;
|
|
109
|
+
left: -3px;
|
|
110
|
+
top: 0;
|
|
111
|
+
width: 7px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.cropper-center::after {
|
|
115
|
+
height: 7px;
|
|
116
|
+
left: 0;
|
|
117
|
+
top: -3px;
|
|
118
|
+
width: 1px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.cropper-face,
|
|
122
|
+
.cropper-line,
|
|
123
|
+
.cropper-point {
|
|
124
|
+
display: block;
|
|
125
|
+
height: 100%;
|
|
126
|
+
opacity: 0.1;
|
|
127
|
+
position: absolute;
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.cropper-face {
|
|
132
|
+
background-color: #fff;
|
|
133
|
+
left: 0;
|
|
134
|
+
top: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.cropper-line {
|
|
138
|
+
background-color: #39f;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cropper-line.line-e {
|
|
142
|
+
cursor: ew-resize;
|
|
143
|
+
right: -3px;
|
|
144
|
+
top: 0;
|
|
145
|
+
width: 5px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.cropper-line.line-n {
|
|
149
|
+
cursor: ns-resize;
|
|
150
|
+
height: 5px;
|
|
151
|
+
left: 0;
|
|
152
|
+
top: -3px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.cropper-line.line-w {
|
|
156
|
+
cursor: ew-resize;
|
|
157
|
+
left: -3px;
|
|
158
|
+
top: 0;
|
|
159
|
+
width: 5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.cropper-line.line-s {
|
|
163
|
+
bottom: -3px;
|
|
164
|
+
cursor: ns-resize;
|
|
165
|
+
height: 5px;
|
|
166
|
+
left: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.cropper-point {
|
|
170
|
+
background-color: #39f;
|
|
171
|
+
height: 5px;
|
|
172
|
+
opacity: 0.75;
|
|
173
|
+
width: 5px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.cropper-point.point-e {
|
|
177
|
+
cursor: ew-resize;
|
|
178
|
+
margin-top: -3px;
|
|
179
|
+
right: -3px;
|
|
180
|
+
top: 50%;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.cropper-point.point-n {
|
|
184
|
+
cursor: ns-resize;
|
|
185
|
+
left: 50%;
|
|
186
|
+
margin-left: -3px;
|
|
187
|
+
top: -3px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.cropper-point.point-w {
|
|
191
|
+
cursor: ew-resize;
|
|
192
|
+
left: -3px;
|
|
193
|
+
margin-top: -3px;
|
|
194
|
+
top: 50%;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.cropper-point.point-s {
|
|
198
|
+
bottom: -3px;
|
|
199
|
+
cursor: s-resize;
|
|
200
|
+
left: 50%;
|
|
201
|
+
margin-left: -3px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.cropper-point.point-ne {
|
|
205
|
+
cursor: nesw-resize;
|
|
206
|
+
right: -3px;
|
|
207
|
+
top: -3px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.cropper-point.point-nw {
|
|
211
|
+
cursor: nwse-resize;
|
|
212
|
+
left: -3px;
|
|
213
|
+
top: -3px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.cropper-point.point-sw {
|
|
217
|
+
bottom: -3px;
|
|
218
|
+
cursor: nesw-resize;
|
|
219
|
+
left: -3px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.cropper-point.point-se {
|
|
223
|
+
bottom: -3px;
|
|
224
|
+
cursor: nwse-resize;
|
|
225
|
+
height: 20px;
|
|
226
|
+
opacity: 1;
|
|
227
|
+
right: -3px;
|
|
228
|
+
width: 20px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media (min-width: 768px) {
|
|
232
|
+
.cropper-point.point-se {
|
|
233
|
+
height: 15px;
|
|
234
|
+
width: 15px;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@media (min-width: 992px) {
|
|
239
|
+
.cropper-point.point-se {
|
|
240
|
+
height: 10px;
|
|
241
|
+
width: 10px;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media (min-width: 1200px) {
|
|
246
|
+
.cropper-point.point-se {
|
|
247
|
+
height: 5px;
|
|
248
|
+
opacity: 0.75;
|
|
249
|
+
width: 5px;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.cropper-point.point-se::before {
|
|
254
|
+
background-color: #39f;
|
|
255
|
+
bottom: -50%;
|
|
256
|
+
content: ' ';
|
|
257
|
+
display: block;
|
|
258
|
+
height: 200%;
|
|
259
|
+
opacity: 0;
|
|
260
|
+
position: absolute;
|
|
261
|
+
right: -50%;
|
|
262
|
+
width: 200%;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.cropper-invisible {
|
|
266
|
+
opacity: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.cropper-bg {
|
|
270
|
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.cropper-hide {
|
|
274
|
+
display: block;
|
|
275
|
+
height: 0;
|
|
276
|
+
position: absolute;
|
|
277
|
+
width: 0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.cropper-hidden {
|
|
281
|
+
display: none !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.cropper-move {
|
|
285
|
+
cursor: move;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.cropper-crop {
|
|
289
|
+
cursor: crosshair;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.cropper-disabled .cropper-drag-box,
|
|
293
|
+
.cropper-disabled .cropper-face,
|
|
294
|
+
.cropper-disabled .cropper-line,
|
|
295
|
+
.cropper-disabled .cropper-point {
|
|
296
|
+
cursor: not-allowed;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
[circle] .cropper-view-box {
|
|
300
|
+
box-shadow: 0 0 0 1px #39f;
|
|
301
|
+
border-radius: 50%;
|
|
302
|
+
outline: 0;
|
|
303
|
+
}
|
|
304
|
+
[circle] .cropper-face {
|
|
305
|
+
background-color: inherit !important;
|
|
306
|
+
}
|
|
307
|
+
[circle] .cropper-view-box {
|
|
308
|
+
outline: inherit !important;
|
|
309
|
+
}
|
|
310
|
+
`;
|
|
311
|
+
//# sourceMappingURL=cropper-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cropper-styles.js","sourceRoot":"","sources":["cropper-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,sCAAsC;AACtC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmT5B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const imageFormats: string[];
|
|
2
|
+
export declare function getExtension(filename: string): string;
|
|
3
|
+
export declare function getFileIcon(extension: string): string;
|
|
4
|
+
export declare function getFileBgIcon(extension: string): string;
|
|
5
|
+
//# sourceMappingURL=image-formats.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const imageFormats = [
|
|
2
|
+
'tiff',
|
|
3
|
+
'pjp',
|
|
4
|
+
'jfif',
|
|
5
|
+
'bmp',
|
|
6
|
+
'gif',
|
|
7
|
+
'svg',
|
|
8
|
+
'png',
|
|
9
|
+
'xbm',
|
|
10
|
+
'dib',
|
|
11
|
+
'jxl',
|
|
12
|
+
'jpeg',
|
|
13
|
+
'svgz',
|
|
14
|
+
'jpg',
|
|
15
|
+
'webp',
|
|
16
|
+
'ico',
|
|
17
|
+
'tif',
|
|
18
|
+
'pjpeg',
|
|
19
|
+
'avif',
|
|
20
|
+
];
|
|
21
|
+
export function getExtension(filename) {
|
|
22
|
+
const parts = filename.split('.');
|
|
23
|
+
return parts?.[parts.length - 1] || '';
|
|
24
|
+
}
|
|
25
|
+
export function getFileIcon(extension) {
|
|
26
|
+
if (extension.toLowerCase() === 'pdf') {
|
|
27
|
+
return new URL('./images/icon-pdf.png', import.meta.url).href;
|
|
28
|
+
}
|
|
29
|
+
return new URL('./images/icon-other.png', import.meta.url).href;
|
|
30
|
+
}
|
|
31
|
+
export function getFileBgIcon(extension) {
|
|
32
|
+
if (extension.toLowerCase() === 'pdf') {
|
|
33
|
+
return new URL('./images/icon-pdf-bg.png', import.meta.url).href;
|
|
34
|
+
}
|
|
35
|
+
return new URL('./images/icon-other-bg.png', import.meta.url).href;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=image-formats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-formats.js","sourceRoot":"","sources":["image-formats.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,OAAO;IACP,MAAM;CACP,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB;IAC3C,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrC,OAAO,IAAI,GAAG,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;KAC/D;IACD,OAAO,IAAI,GAAG,CAAC,yBAAyB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrC,OAAO,IAAI,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;KAClE;IACD,OAAO,IAAI,GAAG,CAAC,4BAA4B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import '@material/web/dialog/dialog';
|
|
2
|
+
import '@material/web/icon/icon';
|
|
3
|
+
import '@material/web/button/text-button';
|
|
4
|
+
import { LitElement } from 'lit';
|
|
5
|
+
import { MdDialog } from '@material/web/dialog/dialog';
|
|
6
|
+
/**
|
|
7
|
+
* Image preview dialog
|
|
8
|
+
*
|
|
9
|
+
* @element image-preview-dialog
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export declare class ImagePreviewDialog extends LitElement {
|
|
13
|
+
protected imageUrl: string | undefined;
|
|
14
|
+
protected downloadSrc: string | undefined;
|
|
15
|
+
protected filename: string | undefined;
|
|
16
|
+
protected dialog: MdDialog;
|
|
17
|
+
open(imageUrl: string, downloadSrc?: string, filename?: string): Promise<void>;
|
|
18
|
+
static styles: import("lit").CSSResult[];
|
|
19
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=image-preview-dialog.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/dialog/dialog';
|
|
3
|
+
import '@material/web/icon/icon';
|
|
4
|
+
import '@material/web/button/text-button';
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
|
+
import { customElement, query, state } from 'lit/decorators.js';
|
|
7
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
|
+
import { middleEllipsis } from '../../titanium/helpers/middle-ellipsis';
|
|
9
|
+
/**
|
|
10
|
+
* Image preview dialog
|
|
11
|
+
*
|
|
12
|
+
* @element image-preview-dialog
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
let ImagePreviewDialog = class ImagePreviewDialog extends LitElement {
|
|
16
|
+
async open(imageUrl, downloadSrc, filename) {
|
|
17
|
+
this.imageUrl = undefined; //prevent ghost images
|
|
18
|
+
this.filename = filename;
|
|
19
|
+
this.downloadSrc = downloadSrc;
|
|
20
|
+
this.imageUrl = imageUrl;
|
|
21
|
+
return this.dialog.show();
|
|
22
|
+
}
|
|
23
|
+
static { this.styles = [
|
|
24
|
+
css `
|
|
25
|
+
div[header] {
|
|
26
|
+
word-break: break-all;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
md-dialog {
|
|
30
|
+
max-width: calc(100vw - 48px);
|
|
31
|
+
max-height: calc(100vh - 48px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
img {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
`,
|
|
38
|
+
]; }
|
|
39
|
+
render() {
|
|
40
|
+
return html `
|
|
41
|
+
<md-dialog>
|
|
42
|
+
<div header slot="headline">${middleEllipsis(this.filename || 'Image preview', 60)}</div>
|
|
43
|
+
<img slot="content" draggable="false" src=${ifDefined(this.imageUrl)} />
|
|
44
|
+
<div slot="actions">
|
|
45
|
+
${this.downloadSrc
|
|
46
|
+
? html `<md-text-button
|
|
47
|
+
@click=${(e) => {
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
window.open(this.downloadSrc);
|
|
50
|
+
}}
|
|
51
|
+
><md-icon slot="icon">file_download</md-icon>Download</md-text-button
|
|
52
|
+
>`
|
|
53
|
+
: html `<div></div>`}
|
|
54
|
+
|
|
55
|
+
<md-text-button
|
|
56
|
+
@click=${(e) => {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
this.dialog.close('close');
|
|
59
|
+
}}
|
|
60
|
+
>Close</md-text-button
|
|
61
|
+
>
|
|
62
|
+
</div>
|
|
63
|
+
</md-dialog>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
__decorate([
|
|
68
|
+
state()
|
|
69
|
+
], ImagePreviewDialog.prototype, "imageUrl", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
state()
|
|
72
|
+
], ImagePreviewDialog.prototype, "downloadSrc", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
state()
|
|
75
|
+
], ImagePreviewDialog.prototype, "filename", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
query('md-dialog')
|
|
78
|
+
], ImagePreviewDialog.prototype, "dialog", void 0);
|
|
79
|
+
ImagePreviewDialog = __decorate([
|
|
80
|
+
customElement('image-preview-dialog')
|
|
81
|
+
], ImagePreviewDialog);
|
|
82
|
+
export { ImagePreviewDialog };
|
|
83
|
+
//# sourceMappingURL=image-preview-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-preview-dialog.js","sourceRoot":"","sources":["image-preview-dialog.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAC;AACrC,OAAO,yBAAyB,CAAC;AACjC,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAGxE;;;;;GAKG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAOhD,KAAK,CAAC,IAAI,CAAC,QAAgB,EAAE,WAAoB,EAAE,QAAiB;QAClE,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,sBAAsB;QACjD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;aAEM,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;KAaF;KACF,AAfY,CAeX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;sCAEuB,cAAc,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAe,EAAE,EAAE,CAAC;oDACtC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;;YAEhE,IAAI,CAAC,WAAW;YAChB,CAAC,CAAC,IAAI,CAAA;yBACO,CAAC,CAAa,EAAE,EAAE;gBACzB,CAAC,CAAC,eAAe,EAAE,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAChC,CAAC;;gBAED;YACJ,CAAC,CAAC,IAAI,CAAA,aAAa;;;qBAGV,CAAC,CAAa,EAAE,EAAE;YACzB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;;;;;KAKR,CAAC;IACJ,CAAC;;AAzDkB;IAAlB,KAAK,EAAE;oDAAwC;AAC7B;IAAlB,KAAK,EAAE;uDAA2C;AAChC;IAAlB,KAAK,EAAE;oDAAwC;AAElB;IAA7B,KAAK,CAAC,WAAW,CAAC;kDAA4B;AALpC,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CA2D9B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import '../chip-multi-select/chip-multi-select';
|
|
2
|
+
import './crop-and-save-image-dialog';
|
|
3
|
+
import './image-preview-dialog';
|
|
4
|
+
import '@material/web/dialog/dialog';
|
|
5
|
+
import '@material/web/icon/icon';
|
|
6
|
+
import '@material/web/button/text-button';
|
|
7
|
+
import '@material/web/button/outlined-button';
|
|
8
|
+
import '@material/web/chips/input-chip';
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
import { CropAndSaveImageDialog, CropperOptions } from './crop-and-save-image-dialog';
|
|
11
|
+
import { SmartAttachment } from './type/smart-attachment';
|
|
12
|
+
import { ImagePreviewDialog } from './image-preview-dialog';
|
|
13
|
+
import { IDatabaseAttachment } from '@leavittsoftware/lg-core-typescript/lg.net.system';
|
|
14
|
+
export type TitaniumSmartInputOptions = Cropper.Options & {
|
|
15
|
+
shape?: ' square' | 'circle';
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Material outline image input with cropper
|
|
19
|
+
*
|
|
20
|
+
* @element titanium-smart-attachment-input
|
|
21
|
+
*
|
|
22
|
+
* @fires change - Fired when image is attached or removed from input.
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class TitaniumSmartAttachmentInput extends LitElement {
|
|
27
|
+
#private;
|
|
28
|
+
protected files: SmartAttachment[];
|
|
29
|
+
protected isOver: boolean;
|
|
30
|
+
protected previewSrc: string | undefined;
|
|
31
|
+
protected input: HTMLInputElement;
|
|
32
|
+
protected imagePreviewDialog: ImagePreviewDialog;
|
|
33
|
+
protected cropperDialog: CropAndSaveImageDialog;
|
|
34
|
+
private confirmDeleteDialog;
|
|
35
|
+
private chipMultiSelect;
|
|
36
|
+
/**
|
|
37
|
+
* File types to accept ex. "image/*,.pdf"
|
|
38
|
+
*/
|
|
39
|
+
accept: string;
|
|
40
|
+
/**
|
|
41
|
+
* Allow multiple attachments
|
|
42
|
+
*/
|
|
43
|
+
multiple: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Requires at least one attachment on validate
|
|
46
|
+
*/
|
|
47
|
+
required: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether or not the input should be disabled
|
|
50
|
+
*/
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Requires user to confirm when delete of an attachment is requested
|
|
54
|
+
*/
|
|
55
|
+
confirmDelete: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Delete confirmation header text
|
|
58
|
+
*/
|
|
59
|
+
confirmDeleteHeader: string;
|
|
60
|
+
/**
|
|
61
|
+
* Delete confirmation paragraph text
|
|
62
|
+
*/
|
|
63
|
+
confirmDeleteText: string;
|
|
64
|
+
/**
|
|
65
|
+
* Add button label text
|
|
66
|
+
*/
|
|
67
|
+
addButtonLabel: string;
|
|
68
|
+
/**
|
|
69
|
+
* Label of input
|
|
70
|
+
*/
|
|
71
|
+
label: string;
|
|
72
|
+
/**
|
|
73
|
+
* Sets supporting text
|
|
74
|
+
*/
|
|
75
|
+
supportingText: string;
|
|
76
|
+
/**
|
|
77
|
+
* Text to show when there are no attachments
|
|
78
|
+
*/
|
|
79
|
+
noItemsText: string;
|
|
80
|
+
/**
|
|
81
|
+
* Configurable CropperJs options.
|
|
82
|
+
*/
|
|
83
|
+
options: CropperOptions;
|
|
84
|
+
/**
|
|
85
|
+
* Image formats here are sent to the cropper
|
|
86
|
+
*/
|
|
87
|
+
croppableImageFormats: Array<string>;
|
|
88
|
+
/**
|
|
89
|
+
* File object of cropped image.
|
|
90
|
+
*/
|
|
91
|
+
getFiles(): SmartAttachment[];
|
|
92
|
+
/**
|
|
93
|
+
* Use to preset input to existing image.
|
|
94
|
+
*/
|
|
95
|
+
setFiles(...files: {
|
|
96
|
+
fileName: string;
|
|
97
|
+
previewSrc?: string;
|
|
98
|
+
downloadSrc?: string;
|
|
99
|
+
id?: number;
|
|
100
|
+
}[]): void;
|
|
101
|
+
/**
|
|
102
|
+
* Use to preset input to existing image.
|
|
103
|
+
*/
|
|
104
|
+
setFilesFromDatabaseAttachments(...attachments: Partial<IDatabaseAttachment>[]): void;
|
|
105
|
+
/**
|
|
106
|
+
* Returns true if the input passes validity checks.
|
|
107
|
+
*/
|
|
108
|
+
checkValidity(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Runs checkValidity() method, and if it returns false, then it reports to the user that the input is invalid.
|
|
111
|
+
*/
|
|
112
|
+
reportValidity(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Returns true if the images have been added, removed or edited.
|
|
115
|
+
*/
|
|
116
|
+
hasChanges(): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Resets the inputs state.
|
|
119
|
+
*/
|
|
120
|
+
reset(): Promise<void>;
|
|
121
|
+
handleNewFile(files: FileList): Promise<void>;
|
|
122
|
+
toBase64(file: File): Promise<string | ArrayBuffer | null>;
|
|
123
|
+
static styles: import("lit").CSSResult[];
|
|
124
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=smart-attachment-input.d.ts.map
|