@cleavelandprice/ngx-lib 3.7.2 → 3.8.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/active-directory/active-directory.module.d.ts +11 -11
- package/active-directory/gui/components/user-chooser/user-chooser.component.d.ts +58 -58
- package/active-directory/gui/components/user-form-field/user-form-field.component.d.ts +29 -29
- package/active-directory/gui/gui.module.d.ts +25 -25
- package/active-directory/gui/index.d.ts +5 -5
- package/active-directory/gui/model/selectable-user.d.ts +5 -5
- package/active-directory/gui/model/user-chooser-data.d.ts +22 -22
- package/active-directory/gui/model/user-chooser-filter-options.d.ts +7 -7
- package/active-directory/gui/model/user-chooser-mode.d.ts +4 -4
- package/active-directory/gui/model/user-chooser-pre-processing-group.d.ts +6 -6
- package/active-directory/gui/public_api.d.ts +8 -8
- package/active-directory/index.d.ts +5 -5
- package/active-directory/model/ad-object-with-children.d.ts +4 -4
- package/active-directory/model/ad-object.d.ts +13 -13
- package/active-directory/model/cache-object.d.ts +4 -4
- package/active-directory/model/caching-config.d.ts +4 -4
- package/active-directory/model/cleaveland-price-user.d.ts +17 -17
- package/active-directory/model/group.d.ts +7 -7
- package/active-directory/model/logging-config.d.ts +6 -6
- package/active-directory/model/service-config.d.ts +8 -8
- package/active-directory/model/user-or-group.d.ts +7 -7
- package/active-directory/model/user.d.ts +23 -23
- package/active-directory/public_api.d.ts +11 -11
- package/active-directory/services/active-directory.service.d.ts +32 -32
- package/authentication/authentication.base.module.d.ts +7 -7
- package/authentication/index.d.ts +5 -5
- package/authentication/model/abstract-authentication-service.d.ts +16 -16
- package/authentication/model/authenticated-user.d.ts +9 -9
- package/authentication/model/authentication-request.d.ts +8 -6
- package/authentication/model/service-config.d.ts +8 -7
- package/authentication/object/index.d.ts +5 -5
- package/authentication/object/model/service-config.d.ts +4 -4
- package/authentication/object/object.module.d.ts +11 -11
- package/authentication/object/public_api.d.ts +3 -3
- package/authentication/object/services/authentication.service.d.ts +25 -25
- package/authentication/public_api.d.ts +5 -5
- package/authentication/token/gui/components/login/login.component.d.ts +14 -13
- package/authentication/token/gui/components/login-form/login-form.component.d.ts +29 -28
- package/authentication/token/gui/index.d.ts +5 -5
- package/authentication/token/gui/model/login-form-data.d.ts +4 -3
- package/authentication/token/gui/model/service-config.d.ts +5 -5
- package/authentication/token/gui/public_api.d.ts +6 -6
- package/authentication/token/gui/services/authentication.service.d.ts +15 -15
- package/authentication/token/gui/token-gui.module.d.ts +21 -21
- package/authentication/token/index.d.ts +5 -5
- package/authentication/token/model/authentication-token.d.ts +17 -17
- package/authentication/token/model/service-config.d.ts +5 -5
- package/authentication/token/public_api.d.ts +4 -4
- package/authentication/token/services/authentication.service.d.ts +24 -24
- package/authentication/token/token.module.d.ts +11 -11
- package/dialog/components/base/base.component.d.ts +22 -22
- package/dialog/components/choice/choice.component.d.ts +12 -12
- package/dialog/components/confirmation/confirmation.component.d.ts +12 -12
- package/dialog/components/input/input.component.d.ts +12 -12
- package/dialog/components/message/message.component.d.ts +12 -12
- package/dialog/dialog.module.d.ts +18 -18
- package/dialog/index.d.ts +5 -5
- package/dialog/model/confirmation-dialog-mode.d.ts +6 -6
- package/dialog/model/dialog-base-data.d.ts +10 -10
- package/dialog/model/dialog-choice-data.d.ts +4 -4
- package/dialog/model/dialog-type.d.ts +6 -6
- package/dialog/public_api.d.ts +9 -9
- package/esm2022/active-directory/active-directory.module.mjs +40 -0
- package/{esm2020 → esm2022}/active-directory/cleavelandprice-ngx-lib-active-directory.mjs +4 -4
- package/{esm2020 → esm2022}/active-directory/gui/cleavelandprice-ngx-lib-active-directory-gui.mjs +4 -4
- package/esm2022/active-directory/gui/components/user-chooser/user-chooser.component.mjs +375 -0
- package/esm2022/active-directory/gui/components/user-form-field/user-form-field.component.mjs +130 -0
- package/esm2022/active-directory/gui/gui.module.mjs +97 -0
- package/{esm2020 → esm2022}/active-directory/gui/model/selectable-user.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/gui/model/user-chooser-data.mjs +32 -32
- package/{esm2020 → esm2022}/active-directory/gui/model/user-chooser-filter-options.mjs +9 -9
- package/{esm2020 → esm2022}/active-directory/gui/model/user-chooser-mode.mjs +5 -5
- package/{esm2020 → esm2022}/active-directory/gui/model/user-chooser-pre-processing-group.mjs +8 -8
- package/{esm2020 → esm2022}/active-directory/gui/public_api.mjs +8 -8
- package/{esm2020 → esm2022}/active-directory/model/ad-object-with-children.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/model/ad-object.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/model/cache-object.mjs +2 -2
- package/{esm2020 → esm2022}/active-directory/model/caching-config.mjs +6 -6
- package/{esm2020 → esm2022}/active-directory/model/cleaveland-price-user.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/model/group.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/model/logging-config.mjs +8 -8
- package/{esm2020 → esm2022}/active-directory/model/service-config.mjs +11 -11
- package/{esm2020 → esm2022}/active-directory/model/user-or-group.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/model/user.mjs +1 -1
- package/{esm2020 → esm2022}/active-directory/public_api.mjs +11 -11
- package/esm2022/active-directory/services/active-directory.service.mjs +112 -0
- package/esm2022/authentication/authentication.base.module.mjs +20 -0
- package/{esm2020 → esm2022}/authentication/cleavelandprice-ngx-lib-authentication.mjs +4 -4
- package/{esm2020 → esm2022}/authentication/model/abstract-authentication-service.mjs +1 -1
- package/{esm2020 → esm2022}/authentication/model/authenticated-user.mjs +1 -1
- package/{esm2020 → esm2022}/authentication/model/authentication-request.mjs +2 -2
- package/esm2022/authentication/model/service-config.mjs +12 -0
- package/{esm2020 → esm2022}/authentication/object/cleavelandprice-ngx-lib-authentication-object.mjs +4 -4
- package/esm2022/authentication/object/model/service-config.mjs +9 -0
- package/esm2022/authentication/object/object.module.mjs +40 -0
- package/{esm2020 → esm2022}/authentication/object/public_api.mjs +3 -3
- package/esm2022/authentication/object/services/authentication.service.mjs +109 -0
- package/{esm2020 → esm2022}/authentication/public_api.mjs +5 -5
- package/{esm2020 → esm2022}/authentication/token/cleavelandprice-ngx-lib-authentication-token.mjs +4 -4
- package/{esm2020 → esm2022}/authentication/token/gui/cleavelandprice-ngx-lib-authentication-token-gui.mjs +4 -4
- package/esm2022/authentication/token/gui/components/login/login.component.mjs +45 -0
- package/esm2022/authentication/token/gui/components/login-form/login-form.component.mjs +74 -0
- package/{esm2020 → esm2022}/authentication/token/gui/model/login-form-data.mjs +2 -2
- package/esm2022/authentication/token/gui/model/service-config.mjs +10 -0
- package/{esm2020 → esm2022}/authentication/token/gui/public_api.mjs +6 -6
- package/esm2022/authentication/token/gui/services/authentication.service.mjs +79 -0
- package/esm2022/authentication/token/gui/token-gui.module.mjs +82 -0
- package/{esm2020 → esm2022}/authentication/token/model/authentication-token.mjs +1 -1
- package/esm2022/authentication/token/model/service-config.mjs +10 -0
- package/{esm2020 → esm2022}/authentication/token/public_api.mjs +4 -4
- package/esm2022/authentication/token/services/authentication.service.mjs +120 -0
- package/esm2022/authentication/token/token.module.mjs +40 -0
- package/{esm2020 → esm2022}/cleavelandprice-ngx-lib.mjs +4 -4
- package/{esm2020 → esm2022}/dialog/cleavelandprice-ngx-lib-dialog.mjs +4 -4
- package/esm2022/dialog/components/base/base.component.mjs +93 -0
- package/esm2022/dialog/components/choice/choice.component.mjs +24 -0
- package/esm2022/dialog/components/confirmation/confirmation.component.mjs +24 -0
- package/esm2022/dialog/components/input/input.component.mjs +24 -0
- package/esm2022/dialog/components/message/message.component.mjs +24 -0
- package/esm2022/dialog/dialog.module.mjs +69 -0
- package/{esm2020 → esm2022}/dialog/model/confirmation-dialog-mode.mjs +7 -7
- package/{esm2020 → esm2022}/dialog/model/dialog-base-data.mjs +1 -1
- package/{esm2020 → esm2022}/dialog/model/dialog-choice-data.mjs +1 -1
- package/{esm2020 → esm2022}/dialog/model/dialog-type.mjs +7 -7
- package/{esm2020 → esm2022}/dialog/public_api.mjs +9 -9
- package/{esm2020 → esm2022}/lib/model/app-path-config.mjs +1 -1
- package/{esm2020 → esm2022}/lib/model/app-type.mjs +1 -1
- package/{esm2020 → esm2022}/lib/model/app.mjs +1 -1
- package/esm2022/lib/model/service-config.mjs +21 -0
- package/esm2022/lib/ngx-lib.module.mjs +37 -0
- package/esm2022/lib/services/app-path-config.service.mjs +46 -0
- package/{esm2020 → esm2022}/msgraph/cleavelandprice-ngx-lib-msgraph.mjs +4 -4
- package/{esm2020 → esm2022}/msgraph/model/address.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/attendee.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/bulk-calendar-events.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/bulk-calendar-request.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/calendar-event.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/coordinates.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/email-address.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/location.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/online-meeting-info.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/patterned-recurrence.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/phone.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/recipient.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/recurrence-pattern.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/recurrence-range.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/response-status.mjs +1 -1
- package/{esm2020 → esm2022}/msgraph/model/room.mjs +5 -5
- package/{esm2020 → esm2022}/msgraph/model/user.mjs +131 -131
- package/esm2022/msgraph/msgraph.module.mjs +33 -0
- package/{esm2020 → esm2022}/msgraph/public_api.mjs +18 -18
- package/{esm2020 → esm2022}/public_api.mjs +9 -9
- package/{esm2020 → esm2022}/quill/cleavelandprice-ngx-lib-quill.mjs +4 -4
- package/esm2022/quill/components/editor/editor.component.mjs +297 -0
- package/esm2022/quill/components/raw/raw.component.mjs +25 -0
- package/{esm2020 → esm2022}/quill/mention/cleavelandprice-ngx-lib-quill-mention.mjs +4 -4
- package/esm2022/quill/mention/components/editor/editor.component.mjs +156 -0
- package/{esm2020 → esm2022}/quill/mention/model/buttons.mjs +3 -3
- package/{esm2020 → esm2022}/quill/mention/model/config.mjs +3 -3
- package/{esm2020 → esm2022}/quill/mention/model/dialog-data.mjs +1 -1
- package/{esm2020 → esm2022}/quill/mention/model/icons.mjs +3 -3
- package/{esm2020 → esm2022}/quill/mention/model/tooltips.mjs +3 -3
- package/{esm2020 → esm2022}/quill/mention/public_api.mjs +7 -7
- package/esm2022/quill/mention/quill-mention.module.mjs +66 -0
- package/{esm2020 → esm2022}/quill/model/buttons.mjs +51 -51
- package/{esm2020 → esm2022}/quill/model/config.mjs +39 -39
- package/{esm2020 → esm2022}/quill/model/dialog-data.mjs +1 -1
- package/{esm2020 → esm2022}/quill/model/icons.mjs +8 -8
- package/{esm2020 → esm2022}/quill/model/tooltips.mjs +54 -54
- package/{esm2020 → esm2022}/quill/public_api.mjs +8 -8
- package/esm2022/quill/quill.module.mjs +79 -0
- package/{esm2020 → esm2022}/sharepoint/cleavelandprice-ngx-lib-sharepoint.mjs +4 -4
- package/esm2022/sharepoint/components/employee-photo/employee-photo.component.mjs +38 -0
- package/{esm2020 → esm2022}/sharepoint/model/base-item.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/base-request-credential.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/base-request.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/cache-object.mjs +2 -2
- package/{esm2020 → esm2022}/sharepoint/model/file-request.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/folder-request.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/list-item.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/list-items-request.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/photo-item.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/service-config.mjs +28 -28
- package/{esm2020 → esm2022}/sharepoint/model/uri-request.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/user-request.mjs +1 -1
- package/{esm2020 → esm2022}/sharepoint/model/user.mjs +1 -1
- package/esm2022/sharepoint/pipes/employee-photo-url.pipe.mjs +39 -0
- package/{esm2020 → esm2022}/sharepoint/public_api.mjs +16 -16
- package/esm2022/sharepoint/services/sharepoint.service.mjs +149 -0
- package/esm2022/sharepoint/sharepoint.module.mjs +50 -0
- package/{esm2020 → esm2022}/upload/cleavelandprice-ngx-lib-upload.mjs +4 -4
- package/esm2022/upload/components/upload/upload.component.mjs +35 -0
- package/esm2022/upload/components/upload-dialog/upload-dialog.component.mjs +87 -0
- package/{esm2020 → esm2022}/upload/model/database-file-info.mjs +1 -1
- package/{esm2020 → esm2022}/upload/model/file-upload-request.mjs +1 -1
- package/{esm2020 → esm2022}/upload/model/filesystem-file-info.mjs +1 -1
- package/{esm2020 → esm2022}/upload/model/service-config.mjs +15 -15
- package/{esm2020 → esm2022}/upload/public_api.mjs +8 -8
- package/esm2022/upload/services/upload.service.mjs +92 -0
- package/esm2022/upload/upload.module.mjs +66 -0
- package/{esm2020 → esm2022}/url-utilities/cleavelandprice-ngx-lib-url-utilities.mjs +4 -4
- package/esm2022/url-utilities/pipes/safe-resource-url.pipe.mjs +21 -0
- package/esm2022/url-utilities/pipes/safe-url.pipe.mjs +21 -0
- package/esm2022/url-utilities/pipes/uri-scheme.pipe.mjs +106 -0
- package/{esm2020 → esm2022}/url-utilities/public_api.mjs +4 -4
- package/esm2022/url-utilities/url-utilities.module.mjs +35 -0
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-active-directory-gui.mjs +586 -587
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-active-directory-gui.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-active-directory.mjs +155 -156
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-active-directory.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-authentication-object.mjs +141 -140
- package/fesm2022/cleavelandprice-ngx-lib-authentication-object.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-authentication-token-gui.mjs +232 -226
- package/fesm2022/cleavelandprice-ngx-lib-authentication-token-gui.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-authentication-token.mjs +152 -151
- package/fesm2022/cleavelandprice-ngx-lib-authentication-token.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/cleavelandprice-ngx-lib-authentication.mjs +25 -25
- package/fesm2022/cleavelandprice-ngx-lib-authentication.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-dialog.mjs +205 -205
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-dialog.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-msgraph.mjs +161 -162
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-msgraph.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-quill-mention.mjs +188 -189
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-quill-mention.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-quill.mjs +492 -493
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-quill.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-sharepoint.mjs +269 -270
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-sharepoint.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-upload.mjs +250 -251
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib-upload.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/cleavelandprice-ngx-lib-url-utilities.mjs +159 -160
- package/fesm2022/cleavelandprice-ngx-lib-url-utilities.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib.mjs +91 -92
- package/{fesm2020 → fesm2022}/cleavelandprice-ngx-lib.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/model/app-path-config.d.ts +10 -10
- package/lib/model/app-type.d.ts +5 -5
- package/lib/model/app.d.ts +16 -16
- package/lib/model/service-config.d.ts +6 -6
- package/lib/ngx-lib.module.d.ts +10 -10
- package/lib/services/app-path-config.service.d.ts +20 -20
- package/msgraph/index.d.ts +5 -5
- package/msgraph/model/address.d.ts +7 -7
- package/msgraph/model/attendee.d.ts +13 -13
- package/msgraph/model/bulk-calendar-events.d.ts +5 -5
- package/msgraph/model/bulk-calendar-request.d.ts +3 -3
- package/msgraph/model/calendar-event.d.ts +53 -53
- package/msgraph/model/coordinates.d.ts +7 -7
- package/msgraph/model/email-address.d.ts +4 -4
- package/msgraph/model/location.d.ts +12 -12
- package/msgraph/model/online-meeting-info.d.ts +9 -9
- package/msgraph/model/patterned-recurrence.d.ts +6 -6
- package/msgraph/model/phone.d.ts +4 -4
- package/msgraph/model/recipient.d.ts +4 -4
- package/msgraph/model/recurrence-pattern.d.ts +9 -9
- package/msgraph/model/recurrence-range.d.ts +7 -7
- package/msgraph/model/response-status.d.ts +4 -4
- package/msgraph/model/room.d.ts +22 -22
- package/msgraph/model/user.d.ts +29 -29
- package/msgraph/msgraph.module.d.ts +10 -10
- package/msgraph/public_api.d.ts +18 -18
- package/package.json +61 -93
- package/public_api.d.ts +6 -6
- package/quill/components/editor/editor.component.d.ts +53 -53
- package/quill/components/raw/raw.component.d.ts +7 -7
- package/quill/index.d.ts +5 -5
- package/quill/mention/components/editor/editor.component.d.ts +20 -20
- package/quill/mention/index.d.ts +5 -5
- package/quill/mention/model/buttons.d.ts +3 -3
- package/quill/mention/model/config.d.ts +3 -3
- package/quill/mention/model/dialog-data.d.ts +5 -5
- package/quill/mention/model/icons.d.ts +3 -3
- package/quill/mention/model/tooltips.d.ts +3 -3
- package/quill/mention/public_api.d.ts +7 -7
- package/quill/mention/quill-mention.module.d.ts +17 -17
- package/quill/model/buttons.d.ts +29 -29
- package/quill/model/config.d.ts +30 -30
- package/quill/model/dialog-data.d.ts +21 -21
- package/quill/model/icons.d.ts +6 -6
- package/quill/model/tooltips.d.ts +32 -32
- package/quill/public_api.d.ts +8 -8
- package/quill/quill.module.d.ts +20 -20
- package/sharepoint/components/employee-photo/employee-photo.component.d.ts +16 -16
- package/sharepoint/index.d.ts +5 -5
- package/sharepoint/model/base-item.d.ts +4 -4
- package/sharepoint/model/base-request-credential.d.ts +4 -4
- package/sharepoint/model/base-request.d.ts +8 -8
- package/sharepoint/model/cache-object.d.ts +4 -4
- package/sharepoint/model/file-request.d.ts +4 -4
- package/sharepoint/model/folder-request.d.ts +4 -4
- package/sharepoint/model/list-item.d.ts +10 -10
- package/sharepoint/model/list-items-request.d.ts +5 -5
- package/sharepoint/model/photo-item.d.ts +11 -11
- package/sharepoint/model/service-config.d.ts +23 -23
- package/sharepoint/model/uri-request.d.ts +4 -4
- package/sharepoint/model/user-request.d.ts +4 -4
- package/sharepoint/model/user.d.ts +12 -12
- package/sharepoint/pipes/employee-photo-url.pipe.d.ts +12 -12
- package/sharepoint/public_api.d.ts +16 -16
- package/sharepoint/services/sharepoint.service.d.ts +25 -25
- package/sharepoint/sharepoint.module.d.ts +13 -13
- package/upload/components/upload/upload.component.d.ts +15 -15
- package/upload/components/upload-dialog/upload-dialog.component.d.ts +24 -24
- package/upload/index.d.ts +5 -5
- package/upload/model/database-file-info.d.ts +7 -7
- package/upload/model/file-upload-request.d.ts +6 -6
- package/upload/model/filesystem-file-info.d.ts +12 -12
- package/upload/model/service-config.d.ts +15 -15
- package/upload/public_api.d.ts +8 -8
- package/upload/services/upload.service.d.ts +18 -18
- package/upload/upload.module.d.ts +17 -17
- package/url-utilities/index.d.ts +5 -5
- package/url-utilities/pipes/safe-resource-url.pipe.d.ts +10 -10
- package/url-utilities/pipes/safe-url.pipe.d.ts +10 -10
- package/url-utilities/pipes/uri-scheme.pipe.d.ts +9 -9
- package/url-utilities/public_api.d.ts +4 -4
- package/url-utilities/url-utilities.module.d.ts +10 -10
- package/esm2020/active-directory/active-directory.module.mjs +0 -39
- package/esm2020/active-directory/gui/components/user-chooser/user-chooser.component.mjs +0 -374
- package/esm2020/active-directory/gui/components/user-form-field/user-form-field.component.mjs +0 -129
- package/esm2020/active-directory/gui/gui.module.mjs +0 -96
- package/esm2020/active-directory/services/active-directory.service.mjs +0 -111
- package/esm2020/authentication/authentication.base.module.mjs +0 -19
- package/esm2020/authentication/model/service-config.mjs +0 -11
- package/esm2020/authentication/object/model/service-config.mjs +0 -9
- package/esm2020/authentication/object/object.module.mjs +0 -39
- package/esm2020/authentication/object/services/authentication.service.mjs +0 -106
- package/esm2020/authentication/token/gui/components/login/login.component.mjs +0 -39
- package/esm2020/authentication/token/gui/components/login-form/login-form.component.mjs +0 -71
- package/esm2020/authentication/token/gui/model/service-config.mjs +0 -10
- package/esm2020/authentication/token/gui/services/authentication.service.mjs +0 -78
- package/esm2020/authentication/token/gui/token-gui.module.mjs +0 -81
- package/esm2020/authentication/token/model/service-config.mjs +0 -10
- package/esm2020/authentication/token/services/authentication.service.mjs +0 -117
- package/esm2020/authentication/token/token.module.mjs +0 -39
- package/esm2020/dialog/components/base/base.component.mjs +0 -92
- package/esm2020/dialog/components/choice/choice.component.mjs +0 -23
- package/esm2020/dialog/components/confirmation/confirmation.component.mjs +0 -23
- package/esm2020/dialog/components/input/input.component.mjs +0 -23
- package/esm2020/dialog/components/message/message.component.mjs +0 -23
- package/esm2020/dialog/dialog.module.mjs +0 -68
- package/esm2020/lib/model/service-config.mjs +0 -21
- package/esm2020/lib/ngx-lib.module.mjs +0 -36
- package/esm2020/lib/services/app-path-config.service.mjs +0 -45
- package/esm2020/msgraph/msgraph.module.mjs +0 -32
- package/esm2020/quill/components/editor/editor.component.mjs +0 -296
- package/esm2020/quill/components/raw/raw.component.mjs +0 -24
- package/esm2020/quill/mention/components/editor/editor.component.mjs +0 -155
- package/esm2020/quill/mention/quill-mention.module.mjs +0 -65
- package/esm2020/quill/quill.module.mjs +0 -78
- package/esm2020/sharepoint/components/employee-photo/employee-photo.component.mjs +0 -37
- package/esm2020/sharepoint/pipes/employee-photo-url.pipe.mjs +0 -38
- package/esm2020/sharepoint/services/sharepoint.service.mjs +0 -148
- package/esm2020/sharepoint/sharepoint.module.mjs +0 -49
- package/esm2020/upload/components/upload/upload.component.mjs +0 -34
- package/esm2020/upload/components/upload-dialog/upload-dialog.component.mjs +0 -86
- package/esm2020/upload/services/upload.service.mjs +0 -91
- package/esm2020/upload/upload.module.mjs +0 -65
- package/esm2020/url-utilities/pipes/safe-resource-url.pipe.mjs +0 -20
- package/esm2020/url-utilities/pipes/safe-url.pipe.mjs +0 -20
- package/esm2020/url-utilities/pipes/uri-scheme.pipe.mjs +0 -105
- package/esm2020/url-utilities/url-utilities.module.mjs +0 -34
- package/fesm2015/cleavelandprice-ngx-lib-active-directory-gui.mjs +0 -652
- package/fesm2015/cleavelandprice-ngx-lib-active-directory-gui.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-active-directory.mjs +0 -187
- package/fesm2015/cleavelandprice-ngx-lib-active-directory.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-authentication-object.mjs +0 -161
- package/fesm2015/cleavelandprice-ngx-lib-authentication-object.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-authentication-token-gui.mjs +0 -274
- package/fesm2015/cleavelandprice-ngx-lib-authentication-token-gui.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-authentication-token.mjs +0 -173
- package/fesm2015/cleavelandprice-ngx-lib-authentication-token.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-authentication.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-dialog.mjs +0 -250
- package/fesm2015/cleavelandprice-ngx-lib-dialog.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-msgraph.mjs +0 -178
- package/fesm2015/cleavelandprice-ngx-lib-msgraph.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-quill-mention.mjs +0 -230
- package/fesm2015/cleavelandprice-ngx-lib-quill-mention.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-quill.mjs +0 -539
- package/fesm2015/cleavelandprice-ngx-lib-quill.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-sharepoint.mjs +0 -310
- package/fesm2015/cleavelandprice-ngx-lib-sharepoint.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-upload.mjs +0 -288
- package/fesm2015/cleavelandprice-ngx-lib-upload.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib-url-utilities.mjs.map +0 -1
- package/fesm2015/cleavelandprice-ngx-lib.mjs +0 -113
- package/fesm2015/cleavelandprice-ngx-lib.mjs.map +0 -1
- package/fesm2020/cleavelandprice-ngx-lib-authentication-object.mjs.map +0 -1
- package/fesm2020/cleavelandprice-ngx-lib-authentication-token-gui.mjs.map +0 -1
- package/fesm2020/cleavelandprice-ngx-lib-authentication-token.mjs.map +0 -1
- package/fesm2020/cleavelandprice-ngx-lib-authentication.mjs +0 -38
- package/fesm2020/cleavelandprice-ngx-lib-authentication.mjs.map +0 -1
- package/fesm2020/cleavelandprice-ngx-lib-url-utilities.mjs +0 -177
- package/fesm2020/cleavelandprice-ngx-lib-url-utilities.mjs.map +0 -1
|
@@ -15,268 +15,267 @@ import { MatListModule } from '@angular/material/list';
|
|
|
15
15
|
import * as i6 from '@angular/material/progress-bar';
|
|
16
16
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
17
17
|
|
|
18
|
-
class ServiceConfig extends ServiceConfig$1 {
|
|
19
|
-
// See the comment in the library's main service-config.ts file for an explanation
|
|
20
|
-
constructor(useSsl_or_customApiUrl = false) {
|
|
21
|
-
super(useSsl_or_customApiUrl);
|
|
22
|
-
this.databaseEndpoint = '/upload/database';
|
|
23
|
-
this.uploadDialogTitle = 'Upload Files';
|
|
24
|
-
// UI configuration
|
|
25
|
-
this.uploadButtonText = 'Upload';
|
|
26
|
-
this.uploadDialogCancelButtonText = 'Cancel';
|
|
27
|
-
this.uploadDialogFinishButtonText = 'Finish';
|
|
28
|
-
this.uploadDialogUploadButtonText = 'Upload';
|
|
29
|
-
this.uploadDialogAddFilesButtonText = 'Add Files';
|
|
30
|
-
}
|
|
18
|
+
class ServiceConfig extends ServiceConfig$1 {
|
|
19
|
+
// See the comment in the library's main service-config.ts file for an explanation
|
|
20
|
+
constructor(useSsl_or_customApiUrl = false) {
|
|
21
|
+
super(useSsl_or_customApiUrl);
|
|
22
|
+
this.databaseEndpoint = '/upload/database';
|
|
23
|
+
this.uploadDialogTitle = 'Upload Files';
|
|
24
|
+
// UI configuration
|
|
25
|
+
this.uploadButtonText = 'Upload';
|
|
26
|
+
this.uploadDialogCancelButtonText = 'Cancel';
|
|
27
|
+
this.uploadDialogFinishButtonText = 'Finish';
|
|
28
|
+
this.uploadDialogUploadButtonText = 'Upload';
|
|
29
|
+
this.uploadDialogAddFilesButtonText = 'Add Files';
|
|
30
|
+
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
// https://malcoded.com/posts/angular-file-upload-component-with-express
|
|
34
|
-
class UploadService {
|
|
35
|
-
constructor(http, config) {
|
|
36
|
-
this.http = http;
|
|
37
|
-
this.config = config;
|
|
38
|
-
this.config = this.config ?? new ServiceConfig();
|
|
39
|
-
}
|
|
40
|
-
upload(files) {
|
|
41
|
-
// this will be the our resulting map
|
|
42
|
-
const status = {};
|
|
43
|
-
files.forEach(file => {
|
|
44
|
-
// create a new multipart-form for every file
|
|
45
|
-
const formData = new FormData();
|
|
46
|
-
formData.append('file', file, file.name);
|
|
47
|
-
// create a http-post request and pass the form
|
|
48
|
-
// tell it to report the upload progress
|
|
49
|
-
// A 'Destination' header is used to optionally configure the file upload destination (filesystem)
|
|
50
|
-
// A 'DbAppId' header is used to configure the unique identifier of database uploads
|
|
51
|
-
let headers = new HttpHeaders();
|
|
52
|
-
if (this.config.uploadPath) {
|
|
53
|
-
headers = headers.set('Destination', this.config.uploadPath);
|
|
54
|
-
}
|
|
55
|
-
if (this.config.dbAppId) {
|
|
56
|
-
headers = headers.set('DbAppId', this.config.dbAppId);
|
|
57
|
-
}
|
|
58
|
-
if (this.config.externalReferenceId) {
|
|
59
|
-
headers = headers.set('ExternalReferenceId', this.config.externalReferenceId);
|
|
60
|
-
}
|
|
61
|
-
if (this.config.comment) {
|
|
62
|
-
headers = headers.set('Comment', this.config.comment);
|
|
63
|
-
}
|
|
64
|
-
const req = new HttpRequest('POST', `${this.config.apiUrl}${this.config.databaseEndpoint}`, formData, {
|
|
65
|
-
reportProgress: true,
|
|
66
|
-
responseType: 'blob',
|
|
67
|
-
headers
|
|
68
|
-
});
|
|
69
|
-
// create a new progress-subject for every file
|
|
70
|
-
const progress = new Subject();
|
|
71
|
-
// send the http-request and subscribe for progress-updates
|
|
72
|
-
this.http.request(req).subscribe(event => {
|
|
73
|
-
if (event.type === HttpEventType.UploadProgress) {
|
|
74
|
-
// calculate the progress percentage
|
|
75
|
-
const percentDone = Math.round(100 * event.loaded / (event.total ?? 1));
|
|
76
|
-
// pass the percentage into the progress-stream
|
|
77
|
-
progress.next(percentDone);
|
|
78
|
-
}
|
|
79
|
-
else if (event instanceof HttpResponse) {
|
|
80
|
-
// Close the progress-stream if we get an answer form the API
|
|
81
|
-
// The upload is complete
|
|
82
|
-
progress.complete();
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
// Save every progress-observable in a map of all observables
|
|
86
|
-
status[file.name] = {
|
|
87
|
-
progress: progress.asObservable()
|
|
88
|
-
};
|
|
89
|
-
});
|
|
90
|
-
// return the map of progress.observables
|
|
91
|
-
return status;
|
|
92
|
-
}
|
|
93
|
-
exists(fileName) {
|
|
94
|
-
const query = `${this.config.apiUrl}${this.config.databaseEndpoint}`.toLowerCase().indexOf('filesystem') === -1 ?
|
|
95
|
-
{ name: fileName, dbAppId: this.config.dbAppId } :
|
|
96
|
-
{ name: fileName, destination: this.config.uploadPath };
|
|
97
|
-
return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/exists`, query);
|
|
98
|
-
}
|
|
99
|
-
download(request) {
|
|
100
|
-
return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/stream`, request, { responseType: 'blob' });
|
|
101
|
-
}
|
|
102
|
-
getUploadInfo(request) {
|
|
103
|
-
return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/info`, request);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
-
type: Injectable,
|
|
110
|
-
args: [{
|
|
111
|
-
providedIn: 'root'
|
|
112
|
-
}]
|
|
113
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ServiceConfig, decorators: [{
|
|
114
|
-
type: Optional
|
|
33
|
+
// https://malcoded.com/posts/angular-file-upload-component-with-express
|
|
34
|
+
class UploadService {
|
|
35
|
+
constructor(http, config) {
|
|
36
|
+
this.http = http;
|
|
37
|
+
this.config = config;
|
|
38
|
+
this.config = this.config ?? new ServiceConfig();
|
|
39
|
+
}
|
|
40
|
+
upload(files) {
|
|
41
|
+
// this will be the our resulting map
|
|
42
|
+
const status = {};
|
|
43
|
+
files.forEach(file => {
|
|
44
|
+
// create a new multipart-form for every file
|
|
45
|
+
const formData = new FormData();
|
|
46
|
+
formData.append('file', file, file.name);
|
|
47
|
+
// create a http-post request and pass the form
|
|
48
|
+
// tell it to report the upload progress
|
|
49
|
+
// A 'Destination' header is used to optionally configure the file upload destination (filesystem)
|
|
50
|
+
// A 'DbAppId' header is used to configure the unique identifier of database uploads
|
|
51
|
+
let headers = new HttpHeaders();
|
|
52
|
+
if (this.config.uploadPath) {
|
|
53
|
+
headers = headers.set('Destination', this.config.uploadPath);
|
|
54
|
+
}
|
|
55
|
+
if (this.config.dbAppId) {
|
|
56
|
+
headers = headers.set('DbAppId', this.config.dbAppId);
|
|
57
|
+
}
|
|
58
|
+
if (this.config.externalReferenceId) {
|
|
59
|
+
headers = headers.set('ExternalReferenceId', this.config.externalReferenceId);
|
|
60
|
+
}
|
|
61
|
+
if (this.config.comment) {
|
|
62
|
+
headers = headers.set('Comment', this.config.comment);
|
|
63
|
+
}
|
|
64
|
+
const req = new HttpRequest('POST', `${this.config.apiUrl}${this.config.databaseEndpoint}`, formData, {
|
|
65
|
+
reportProgress: true,
|
|
66
|
+
responseType: 'blob',
|
|
67
|
+
headers
|
|
68
|
+
});
|
|
69
|
+
// create a new progress-subject for every file
|
|
70
|
+
const progress = new Subject();
|
|
71
|
+
// send the http-request and subscribe for progress-updates
|
|
72
|
+
this.http.request(req).subscribe(event => {
|
|
73
|
+
if (event.type === HttpEventType.UploadProgress) {
|
|
74
|
+
// calculate the progress percentage
|
|
75
|
+
const percentDone = Math.round(100 * event.loaded / (event.total ?? 1));
|
|
76
|
+
// pass the percentage into the progress-stream
|
|
77
|
+
progress.next(percentDone);
|
|
78
|
+
}
|
|
79
|
+
else if (event instanceof HttpResponse) {
|
|
80
|
+
// Close the progress-stream if we get an answer form the API
|
|
81
|
+
// The upload is complete
|
|
82
|
+
progress.complete();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
// Save every progress-observable in a map of all observables
|
|
86
|
+
status[file.name] = {
|
|
87
|
+
progress: progress.asObservable()
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
// return the map of progress.observables
|
|
91
|
+
return status;
|
|
92
|
+
}
|
|
93
|
+
exists(fileName) {
|
|
94
|
+
const query = `${this.config.apiUrl}${this.config.databaseEndpoint}`.toLowerCase().indexOf('filesystem') === -1 ?
|
|
95
|
+
{ name: fileName, dbAppId: this.config.dbAppId } :
|
|
96
|
+
{ name: fileName, destination: this.config.uploadPath };
|
|
97
|
+
return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/exists`, query);
|
|
98
|
+
}
|
|
99
|
+
download(request) {
|
|
100
|
+
return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/stream`, request, { responseType: 'blob' });
|
|
101
|
+
}
|
|
102
|
+
getUploadInfo(request) {
|
|
103
|
+
return this.http.post(`${this.config.apiUrl}${this.config.databaseEndpoint}/info`, request);
|
|
104
|
+
}
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadService, deps: [{ token: i1.HttpClient }, { token: ServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
106
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadService, providedIn: 'root' }); }
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadService, decorators: [{
|
|
109
|
+
type: Injectable,
|
|
110
|
+
args: [{
|
|
111
|
+
providedIn: 'root'
|
|
112
|
+
}]
|
|
113
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ServiceConfig, decorators: [{
|
|
114
|
+
type: Optional
|
|
115
115
|
}] }]; } });
|
|
116
116
|
|
|
117
|
-
class UploadDialogComponent {
|
|
118
|
-
constructor(dialogRef, uploadService) {
|
|
119
|
-
this.dialogRef = dialogRef;
|
|
120
|
-
this.uploadService = uploadService;
|
|
121
|
-
this.files = new Set();
|
|
122
|
-
this.canBeClosed = true;
|
|
123
|
-
this.showCancelButton = true;
|
|
124
|
-
this.uploading = false;
|
|
125
|
-
this.uploadSuccessful = false;
|
|
126
|
-
}
|
|
127
|
-
ngOnInit() {
|
|
128
|
-
this.primaryButtonText = this.uploadService.config.uploadDialogUploadButtonText;
|
|
129
|
-
}
|
|
130
|
-
addFiles() {
|
|
131
|
-
this.file.nativeElement.click();
|
|
132
|
-
}
|
|
133
|
-
onFilesAdded() {
|
|
134
|
-
const files = this.file.nativeElement.files;
|
|
135
|
-
for (const key in files) {
|
|
136
|
-
if (!isNaN(parseInt(key))) {
|
|
137
|
-
// See if the file already exists
|
|
138
|
-
this.uploadService.exists(files[key].name)
|
|
139
|
-
.subscribe(exists => {
|
|
140
|
-
if (exists) {
|
|
141
|
-
this.existingFileConflict = files[key].name;
|
|
142
|
-
}
|
|
143
|
-
if (!exists) {
|
|
144
|
-
this.files.add(files[key]);
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
closeDialog() {
|
|
151
|
-
// if everything was uploaded already, just close the dialog
|
|
152
|
-
if (this.uploadSuccessful) {
|
|
153
|
-
return this.dialogRef.close();
|
|
154
|
-
}
|
|
155
|
-
// set the component state to "uploading"
|
|
156
|
-
this.uploading = true;
|
|
157
|
-
// start the upload and save the progress map
|
|
158
|
-
this.progress = this.uploadService.upload(this.files);
|
|
159
|
-
// convert the progress map into an array
|
|
160
|
-
const allProgressObservables = [];
|
|
161
|
-
for (let key in this.progress) {
|
|
162
|
-
allProgressObservables.push(this.progress[key].progress);
|
|
163
|
-
}
|
|
164
|
-
// Adjust the state variables
|
|
165
|
-
// The OK-button should have the text "Finish" now
|
|
166
|
-
this.primaryButtonText = this.uploadService.config.uploadDialogFinishButtonText;
|
|
167
|
-
// The dialog should not be closed while uploading
|
|
168
|
-
this.canBeClosed = false;
|
|
169
|
-
this.dialogRef.disableClose = true;
|
|
170
|
-
// Hide the cancel-button
|
|
171
|
-
this.showCancelButton = false;
|
|
172
|
-
// When all progress-observables are completed...
|
|
173
|
-
forkJoin(allProgressObservables).subscribe(end => {
|
|
174
|
-
// ... the dialog can be closed again...
|
|
175
|
-
this.canBeClosed = true;
|
|
176
|
-
this.dialogRef.disableClose = false;
|
|
177
|
-
// ... the upload was successful...
|
|
178
|
-
this.uploadSuccessful = true;
|
|
179
|
-
// ... and the component is no longer uploading
|
|
180
|
-
this.uploading = false;
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
187
|
-
type: Component,
|
|
188
|
-
args: [{ template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ uploadService.config.uploadDialogAddFilesButtonText }}\n </button>\n</div>\n\n<div id=\"conflict\" *ngIf=\"existingFileConflict\">\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\n</div>\n\n<mat-dialog-content>\n <mat-list>\n <mat-list-item *ngFor=\"let file of files\">\n <h4 mat-line>{{file.name}}</h4>\n <mat-progress-bar *ngIf=\"progress\" mode=\"determinate\" [value]=\"progress[file.name].progress | async\"></mat-progress-bar>\n </mat-list-item>\n </mat-list>\n</mat-dialog-content>\n\n<mat-dialog-actions id=\"actions\">\n <button *ngIf=\"showCancelButton\" mat-button mat-dialog-close>{{ uploadService.config.uploadDialogCancelButtonText }}</button>\n <button *ngIf=\"files.size > 0\" mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\n</mat-dialog-actions>\n", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"] }]
|
|
189
|
-
}], ctorParameters: function () { return [{ type: i1$1.MatDialogRef }, { type: UploadService }]; }, propDecorators: { file: [{
|
|
190
|
-
type: ViewChild,
|
|
191
|
-
args: ['file', { static: true }]
|
|
117
|
+
class UploadDialogComponent {
|
|
118
|
+
constructor(dialogRef, uploadService) {
|
|
119
|
+
this.dialogRef = dialogRef;
|
|
120
|
+
this.uploadService = uploadService;
|
|
121
|
+
this.files = new Set();
|
|
122
|
+
this.canBeClosed = true;
|
|
123
|
+
this.showCancelButton = true;
|
|
124
|
+
this.uploading = false;
|
|
125
|
+
this.uploadSuccessful = false;
|
|
126
|
+
}
|
|
127
|
+
ngOnInit() {
|
|
128
|
+
this.primaryButtonText = this.uploadService.config.uploadDialogUploadButtonText;
|
|
129
|
+
}
|
|
130
|
+
addFiles() {
|
|
131
|
+
this.file.nativeElement.click();
|
|
132
|
+
}
|
|
133
|
+
onFilesAdded() {
|
|
134
|
+
const files = this.file.nativeElement.files;
|
|
135
|
+
for (const key in files) {
|
|
136
|
+
if (!isNaN(parseInt(key))) {
|
|
137
|
+
// See if the file already exists
|
|
138
|
+
this.uploadService.exists(files[key].name)
|
|
139
|
+
.subscribe(exists => {
|
|
140
|
+
if (exists) {
|
|
141
|
+
this.existingFileConflict = files[key].name;
|
|
142
|
+
}
|
|
143
|
+
if (!exists) {
|
|
144
|
+
this.files.add(files[key]);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
closeDialog() {
|
|
151
|
+
// if everything was uploaded already, just close the dialog
|
|
152
|
+
if (this.uploadSuccessful) {
|
|
153
|
+
return this.dialogRef.close();
|
|
154
|
+
}
|
|
155
|
+
// set the component state to "uploading"
|
|
156
|
+
this.uploading = true;
|
|
157
|
+
// start the upload and save the progress map
|
|
158
|
+
this.progress = this.uploadService.upload(this.files);
|
|
159
|
+
// convert the progress map into an array
|
|
160
|
+
const allProgressObservables = [];
|
|
161
|
+
for (let key in this.progress) {
|
|
162
|
+
allProgressObservables.push(this.progress[key].progress);
|
|
163
|
+
}
|
|
164
|
+
// Adjust the state variables
|
|
165
|
+
// The OK-button should have the text "Finish" now
|
|
166
|
+
this.primaryButtonText = this.uploadService.config.uploadDialogFinishButtonText;
|
|
167
|
+
// The dialog should not be closed while uploading
|
|
168
|
+
this.canBeClosed = false;
|
|
169
|
+
this.dialogRef.disableClose = true;
|
|
170
|
+
// Hide the cancel-button
|
|
171
|
+
this.showCancelButton = false;
|
|
172
|
+
// When all progress-observables are completed...
|
|
173
|
+
forkJoin(allProgressObservables).subscribe(end => {
|
|
174
|
+
// ... the dialog can be closed again...
|
|
175
|
+
this.canBeClosed = true;
|
|
176
|
+
this.dialogRef.disableClose = false;
|
|
177
|
+
// ... the upload was successful...
|
|
178
|
+
this.uploadSuccessful = true;
|
|
179
|
+
// ... and the component is no longer uploading
|
|
180
|
+
this.uploading = false;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadDialogComponent, deps: [{ token: i1$1.MatDialogRef }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
184
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: UploadDialogComponent, selector: "ng-component", viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, static: true }], ngImport: i0, template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ uploadService.config.uploadDialogAddFilesButtonText }}\n </button>\n</div>\n\n<div id=\"conflict\" *ngIf=\"existingFileConflict\">\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\n</div>\n\n<mat-dialog-content>\n <mat-list>\n <mat-list-item *ngFor=\"let file of files\">\n <h4 mat-line>{{file.name}}</h4>\n <mat-progress-bar *ngIf=\"progress\" mode=\"determinate\" [value]=\"progress[file.name].progress | async\"></mat-progress-bar>\n </mat-list-item>\n </mat-list>\n</mat-dialog-content>\n\n<mat-dialog-actions id=\"actions\">\n <button *ngIf=\"showCancelButton\" mat-button mat-dialog-close>{{ uploadService.config.uploadDialogCancelButtonText }}</button>\n <button *ngIf=\"files.size > 0\" mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\n</mat-dialog-actions>\n", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i5.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
|
|
185
|
+
}
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadDialogComponent, decorators: [{
|
|
187
|
+
type: Component,
|
|
188
|
+
args: [{ template: "<input type=\"file\" #file style=\"display: none\" (change)=\"onFilesAdded()\" multiple />\n\n<div mat-dialog-title id=\"title\">\n <div>{{ uploadService.config.uploadDialogTitle }}</div>\n <button [disabled]=\"uploading || uploadSuccessful\" mat-raised-button color=\"primary\" class=\"add-files-btn\" (click)=\"addFiles()\">\n {{ uploadService.config.uploadDialogAddFilesButtonText }}\n </button>\n</div>\n\n<div id=\"conflict\" *ngIf=\"existingFileConflict\">\n {{ existingFileConflict }} already exists on the server and cannot be overwritten\n</div>\n\n<mat-dialog-content>\n <mat-list>\n <mat-list-item *ngFor=\"let file of files\">\n <h4 mat-line>{{file.name}}</h4>\n <mat-progress-bar *ngIf=\"progress\" mode=\"determinate\" [value]=\"progress[file.name].progress | async\"></mat-progress-bar>\n </mat-list-item>\n </mat-list>\n</mat-dialog-content>\n\n<mat-dialog-actions id=\"actions\">\n <button *ngIf=\"showCancelButton\" mat-button mat-dialog-close>{{ uploadService.config.uploadDialogCancelButtonText }}</button>\n <button *ngIf=\"files.size > 0\" mat-raised-button color=\"primary\" [disabled]=\"!canBeClosed\" (click)=\"closeDialog()\">{{ primaryButtonText }}</button>\n</mat-dialog-actions>\n", styles: ["#title{display:flex;justify-content:space-between}#actions{display:flex;justify-content:flex-end}#conflict{font-size:.8em;color:red;margin-top:.5em}\n"] }]
|
|
189
|
+
}], ctorParameters: function () { return [{ type: i1$1.MatDialogRef }, { type: UploadService }]; }, propDecorators: { file: [{
|
|
190
|
+
type: ViewChild,
|
|
191
|
+
args: ['file', { static: true }]
|
|
192
192
|
}] } });
|
|
193
193
|
|
|
194
|
-
class UploadComponent {
|
|
195
|
-
constructor(dialog, uploadService) {
|
|
196
|
-
this.dialog = dialog;
|
|
197
|
-
this.uploadService = uploadService;
|
|
198
|
-
this.dialogClosed = new EventEmitter();
|
|
199
|
-
}
|
|
200
|
-
ngOnInit() {
|
|
201
|
-
this.uploadButtonText = this.uploadService.config.uploadButtonText ?
|
|
202
|
-
this.uploadService.config.uploadButtonText :
|
|
203
|
-
'Upload';
|
|
204
|
-
}
|
|
205
|
-
openUploadDialog() {
|
|
206
|
-
this.dialog.open(UploadDialogComponent, { width: '50%' })
|
|
207
|
-
.afterClosed().subscribe(() => this.dialogClosed.emit());
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
213
|
-
type: Component,
|
|
214
|
-
args: [{
|
|
215
|
-
selector: 'cp-upload',
|
|
216
|
-
template: '<button mat-raised-button (click)="openUploadDialog()">{{ uploadButtonText }}</button>'
|
|
217
|
-
}]
|
|
218
|
-
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: UploadService }]; }, propDecorators: { dialogClosed: [{
|
|
219
|
-
type: Output
|
|
194
|
+
class UploadComponent {
|
|
195
|
+
constructor(dialog, uploadService) {
|
|
196
|
+
this.dialog = dialog;
|
|
197
|
+
this.uploadService = uploadService;
|
|
198
|
+
this.dialogClosed = new EventEmitter();
|
|
199
|
+
}
|
|
200
|
+
ngOnInit() {
|
|
201
|
+
this.uploadButtonText = this.uploadService.config.uploadButtonText ?
|
|
202
|
+
this.uploadService.config.uploadButtonText :
|
|
203
|
+
'Upload';
|
|
204
|
+
}
|
|
205
|
+
openUploadDialog() {
|
|
206
|
+
this.dialog.open(UploadDialogComponent, { width: '50%' })
|
|
207
|
+
.afterClosed().subscribe(() => this.dialogClosed.emit());
|
|
208
|
+
}
|
|
209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadComponent, deps: [{ token: i1$1.MatDialog }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
210
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: UploadComponent, selector: "cp-upload", outputs: { dialogClosed: "dialogClosed" }, ngImport: i0, template: '<button mat-raised-button (click)="openUploadDialog()">{{ uploadButtonText }}</button>', isInline: true, dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] }); }
|
|
211
|
+
}
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadComponent, decorators: [{
|
|
213
|
+
type: Component,
|
|
214
|
+
args: [{
|
|
215
|
+
selector: 'cp-upload',
|
|
216
|
+
template: '<button mat-raised-button (click)="openUploadDialog()">{{ uploadButtonText }}</button>'
|
|
217
|
+
}]
|
|
218
|
+
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: UploadService }]; }, propDecorators: { dialogClosed: [{
|
|
219
|
+
type: Output
|
|
220
220
|
}] } });
|
|
221
221
|
|
|
222
|
-
class UploadModule {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
252
|
-
type: NgModule,
|
|
253
|
-
args: [{
|
|
254
|
-
declarations: [
|
|
255
|
-
UploadComponent,
|
|
256
|
-
UploadDialogComponent
|
|
257
|
-
],
|
|
258
|
-
imports: [
|
|
259
|
-
CommonModule,
|
|
260
|
-
MatButtonModule,
|
|
261
|
-
MatDialogModule,
|
|
262
|
-
MatListModule,
|
|
263
|
-
MatProgressBarModule
|
|
264
|
-
],
|
|
265
|
-
exports: [
|
|
266
|
-
UploadComponent,
|
|
267
|
-
UploadDialogComponent
|
|
268
|
-
]
|
|
269
|
-
}]
|
|
270
|
-
}], ctorParameters: function () { return [{ type: UploadModule, decorators: [{
|
|
271
|
-
type: Optional
|
|
272
|
-
}, {
|
|
273
|
-
type: SkipSelf
|
|
222
|
+
class UploadModule {
|
|
223
|
+
static forRoot(uploadConfig) {
|
|
224
|
+
return {
|
|
225
|
+
ngModule: UploadModule,
|
|
226
|
+
providers: [
|
|
227
|
+
UploadService,
|
|
228
|
+
{ provide: ServiceConfig, useValue: uploadConfig }
|
|
229
|
+
]
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
constructor(parentModule) {
|
|
233
|
+
if (parentModule) {
|
|
234
|
+
throw new Error('UploadModule is already loaded. Import it in the AppModule only');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadModule, deps: [{ token: UploadModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
238
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: UploadModule, declarations: [UploadComponent,
|
|
239
|
+
UploadDialogComponent], imports: [CommonModule,
|
|
240
|
+
MatButtonModule,
|
|
241
|
+
MatDialogModule,
|
|
242
|
+
MatListModule,
|
|
243
|
+
MatProgressBarModule], exports: [UploadComponent,
|
|
244
|
+
UploadDialogComponent] }); }
|
|
245
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadModule, imports: [CommonModule,
|
|
246
|
+
MatButtonModule,
|
|
247
|
+
MatDialogModule,
|
|
248
|
+
MatListModule,
|
|
249
|
+
MatProgressBarModule] }); }
|
|
250
|
+
}
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: UploadModule, decorators: [{
|
|
252
|
+
type: NgModule,
|
|
253
|
+
args: [{
|
|
254
|
+
declarations: [
|
|
255
|
+
UploadComponent,
|
|
256
|
+
UploadDialogComponent
|
|
257
|
+
],
|
|
258
|
+
imports: [
|
|
259
|
+
CommonModule,
|
|
260
|
+
MatButtonModule,
|
|
261
|
+
MatDialogModule,
|
|
262
|
+
MatListModule,
|
|
263
|
+
MatProgressBarModule
|
|
264
|
+
],
|
|
265
|
+
exports: [
|
|
266
|
+
UploadComponent,
|
|
267
|
+
UploadDialogComponent
|
|
268
|
+
]
|
|
269
|
+
}]
|
|
270
|
+
}], ctorParameters: function () { return [{ type: UploadModule, decorators: [{
|
|
271
|
+
type: Optional
|
|
272
|
+
}, {
|
|
273
|
+
type: SkipSelf
|
|
274
274
|
}] }]; } });
|
|
275
275
|
|
|
276
|
-
/**
|
|
277
|
-
* Generated bundle index. Do not edit.
|
|
276
|
+
/**
|
|
277
|
+
* Generated bundle index. Do not edit.
|
|
278
278
|
*/
|
|
279
279
|
|
|
280
280
|
export { ServiceConfig, UploadComponent, UploadDialogComponent, UploadModule, UploadService };
|
|
281
281
|
//# sourceMappingURL=cleavelandprice-ngx-lib-upload.mjs.map
|
|
282
|
-
//# sourceMappingURL=cleavelandprice-ngx-lib-upload.mjs.map
|