@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
|
@@ -5,164 +5,165 @@ import { JwtHelperService } from '@auth0/angular-jwt';
|
|
|
5
5
|
import * as i2 from '@angular/common/http';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
|
|
8
|
-
//import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';
|
|
9
|
-
class ServiceConfig extends ServiceConfig$1 {
|
|
10
|
-
// See the comment in the library's main service-config.ts file for an explanation
|
|
11
|
-
constructor(useSsl_or_customApiUrl = false, tokenName = 'token', authenticateEndpoint = '/authenticate/token') {
|
|
12
|
-
super(useSsl_or_customApiUrl, tokenName, authenticateEndpoint);
|
|
13
|
-
this.deferTokenValidation = false;
|
|
14
|
-
}
|
|
8
|
+
//import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';
|
|
9
|
+
class ServiceConfig extends ServiceConfig$1 {
|
|
10
|
+
// See the comment in the library's main service-config.ts file for an explanation
|
|
11
|
+
constructor(useSsl_or_customApiUrl = false, appName = undefined, tokenName = 'token', authenticateEndpoint = '/authenticate/token') {
|
|
12
|
+
super(useSsl_or_customApiUrl, appName, tokenName, authenticateEndpoint);
|
|
13
|
+
this.deferTokenValidation = false;
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
class AuthenticationService {
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region Utilities
|
|
46
|
-
//Authenticate the user and store the token in Local Storage
|
|
47
|
-
login(username, password, adminGroup) {
|
|
48
|
-
const request = {
|
|
49
|
-
username
|
|
50
|
-
password
|
|
51
|
-
adminGroup
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
i0.ɵɵ
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
type: Output
|
|
124
|
-
}],
|
|
125
|
-
type: Output
|
|
17
|
+
class AuthenticationService {
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region Properties
|
|
20
|
+
get useSessionStorage() {
|
|
21
|
+
return !!localStorage.getItem('storeTokenInSession');
|
|
22
|
+
}
|
|
23
|
+
get storage() {
|
|
24
|
+
return this.useSessionStorage ?
|
|
25
|
+
sessionStorage :
|
|
26
|
+
localStorage;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region Lifecycle
|
|
30
|
+
constructor(config, http) {
|
|
31
|
+
this.config = config;
|
|
32
|
+
this.http = http;
|
|
33
|
+
//#region Fields
|
|
34
|
+
this.authenticatedChanged = new EventEmitter();
|
|
35
|
+
this.authenticatingChanged = new EventEmitter();
|
|
36
|
+
this.authenticationError = new EventEmitter();
|
|
37
|
+
this.authenticating = false; // Flag set to true while the service is attempting to authenticate the user
|
|
38
|
+
this.authenticated = false; // Flag set to true when the user is successfully authenticated
|
|
39
|
+
this.config = this.config ?? new ServiceConfig();
|
|
40
|
+
if (!this.config.deferTokenValidation) {
|
|
41
|
+
this.checkForExistingToken();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region Utilities
|
|
46
|
+
//Authenticate the user and store the token in Local Storage
|
|
47
|
+
login(username, password, adminGroup, additionalInfo) {
|
|
48
|
+
const request = {
|
|
49
|
+
username,
|
|
50
|
+
password,
|
|
51
|
+
adminGroup,
|
|
52
|
+
additionalInfo,
|
|
53
|
+
appName: this.config.appName
|
|
54
|
+
};
|
|
55
|
+
this.authenticating = true;
|
|
56
|
+
this.authenticatingChanged.emit(this.authenticating);
|
|
57
|
+
// Sending a 'raw' POST request so that we can tell HttpClient that we are expecting text instead of Json
|
|
58
|
+
// Otherwise, it would throw an error trying to decode Json from the response
|
|
59
|
+
this.http.request('POST', `${this.config.apiUrl}${this.config.authenticateEndpoint}`, { body: request, responseType: 'text' })
|
|
60
|
+
.subscribe({
|
|
61
|
+
next: (token) => {
|
|
62
|
+
if (token) {
|
|
63
|
+
this.validateUser(token);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.logout();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
error: (err) => {
|
|
70
|
+
this.authenticating = false;
|
|
71
|
+
this.authenticatingChanged.emit(this.authenticating);
|
|
72
|
+
this.authenticationError.emit(err);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//Logout the user and delete the token from Local Storage
|
|
77
|
+
logout() {
|
|
78
|
+
if (this.storage.getItem(this.config.tokenName)) {
|
|
79
|
+
this.storage.removeItem(this.config.tokenName);
|
|
80
|
+
}
|
|
81
|
+
this.authenticatedUser = undefined;
|
|
82
|
+
this.authenticated = false;
|
|
83
|
+
this.authenticatedChanged.emit(false);
|
|
84
|
+
}
|
|
85
|
+
validateUser(token) {
|
|
86
|
+
const jwtHelper = new JwtHelperService();
|
|
87
|
+
const decoded = jwtHelper.decodeToken(token);
|
|
88
|
+
if (jwtHelper.isTokenExpired(token)) {
|
|
89
|
+
this.logout();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.authenticatedUser = {
|
|
93
|
+
admin: decoded.role === 'Admin',
|
|
94
|
+
displayName: decoded.displayName,
|
|
95
|
+
accountName: decoded.winaccountname,
|
|
96
|
+
distinguishedName: decoded.distinguishedName,
|
|
97
|
+
employeeNumber: decoded.employeeNumber,
|
|
98
|
+
memberOf: decoded.memberOf
|
|
99
|
+
};
|
|
100
|
+
this.storage.setItem(this.config.tokenName, token);
|
|
101
|
+
this.authenticated = true;
|
|
102
|
+
this.authenticatedChanged.emit(this.authenticated);
|
|
103
|
+
this.authenticating = false;
|
|
104
|
+
this.authenticatingChanged.emit(this.authenticating);
|
|
105
|
+
}
|
|
106
|
+
checkForExistingToken() {
|
|
107
|
+
const token = this.storage.getItem(this.config.tokenName);
|
|
108
|
+
if (token) {
|
|
109
|
+
this.validateUser(token);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationService, deps: [{ token: ServiceConfig, optional: true }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
113
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationService, providedIn: 'root' }); }
|
|
114
|
+
}
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationService, decorators: [{
|
|
116
|
+
type: Injectable,
|
|
117
|
+
args: [{
|
|
118
|
+
providedIn: 'root'
|
|
119
|
+
}]
|
|
120
|
+
}], ctorParameters: function () { return [{ type: ServiceConfig, decorators: [{
|
|
121
|
+
type: Optional
|
|
122
|
+
}] }, { type: i2.HttpClient }]; }, propDecorators: { authenticatedChanged: [{
|
|
123
|
+
type: Output
|
|
124
|
+
}], authenticatingChanged: [{
|
|
125
|
+
type: Output
|
|
126
|
+
}], authenticationError: [{
|
|
127
|
+
type: Output
|
|
126
128
|
}] } });
|
|
127
129
|
|
|
128
|
-
class TokenModule {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
148
|
-
type: NgModule,
|
|
149
|
-
args: [{
|
|
150
|
-
declarations: [],
|
|
151
|
-
imports: [
|
|
152
|
-
CommonModule
|
|
153
|
-
],
|
|
154
|
-
exports: []
|
|
155
|
-
}]
|
|
156
|
-
}], ctorParameters: function () { return [{ type: TokenModule, decorators: [{
|
|
157
|
-
type: Optional
|
|
158
|
-
}, {
|
|
159
|
-
type: SkipSelf
|
|
130
|
+
class TokenModule {
|
|
131
|
+
static forRoot(config) {
|
|
132
|
+
return {
|
|
133
|
+
ngModule: TokenModule,
|
|
134
|
+
providers: [
|
|
135
|
+
AuthenticationService,
|
|
136
|
+
{ provide: ServiceConfig, useValue: config }
|
|
137
|
+
]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
constructor(parentModule) {
|
|
141
|
+
if (parentModule) {
|
|
142
|
+
throw new Error('TokenModule is already loaded. Import it in the AppModule only');
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenModule, deps: [{ token: TokenModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
146
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: TokenModule, imports: [CommonModule] }); }
|
|
147
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenModule, imports: [CommonModule] }); }
|
|
148
|
+
}
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: TokenModule, decorators: [{
|
|
150
|
+
type: NgModule,
|
|
151
|
+
args: [{
|
|
152
|
+
declarations: [],
|
|
153
|
+
imports: [
|
|
154
|
+
CommonModule
|
|
155
|
+
],
|
|
156
|
+
exports: []
|
|
157
|
+
}]
|
|
158
|
+
}], ctorParameters: function () { return [{ type: TokenModule, decorators: [{
|
|
159
|
+
type: Optional
|
|
160
|
+
}, {
|
|
161
|
+
type: SkipSelf
|
|
160
162
|
}] }]; } });
|
|
161
163
|
|
|
162
|
-
/**
|
|
163
|
-
* Generated bundle index. Do not edit.
|
|
164
|
+
/**
|
|
165
|
+
* Generated bundle index. Do not edit.
|
|
164
166
|
*/
|
|
165
167
|
|
|
166
168
|
export { AuthenticationService, ServiceConfig, TokenModule };
|
|
167
169
|
//# sourceMappingURL=cleavelandprice-ngx-lib-authentication-token.mjs.map
|
|
168
|
-
//# sourceMappingURL=cleavelandprice-ngx-lib-authentication-token.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleavelandprice-ngx-lib-authentication-token.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/services/authentication.service.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/token.module.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/token/src/cleavelandprice-ngx-lib-authentication-token.ts"],"sourcesContent":["//import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';\r\nimport { ServiceConfig as BaseServiceConfig } from '@cleavelandprice/ngx-lib/authentication';\r\n\r\nexport class ServiceConfig extends BaseServiceConfig {\r\n deferTokenValidation = false;\r\n \r\n // See the comment in the library's main service-config.ts file for an explanation\r\n constructor(useSsl_or_customApiUrl: boolean | string = false,\r\n appName: string | undefined = undefined,\r\n tokenName = 'token',\r\n authenticateEndpoint = '/authenticate/token'\r\n ) {\r\n super(useSsl_or_customApiUrl, appName, tokenName, authenticateEndpoint);\r\n }\r\n}","import { EventEmitter, Injectable, Optional, Output } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { JwtHelperService } from '@auth0/angular-jwt';\r\n\r\nimport {\r\n AbstractAuthenticationService,\r\n AuthenticatedUser,\r\n AuthenticationRequest\r\n} from '@cleavelandprice/ngx-lib/authentication';\r\n\r\nimport { AuthenticationToken } from '../model/authentication-token';\r\nimport { ServiceConfig } from '../model/service-config';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationService implements AbstractAuthenticationService {\r\n //#region Fields\r\n @Output() authenticatedChanged = new EventEmitter<boolean>();\r\n @Output() authenticatingChanged = new EventEmitter<boolean>();\r\n @Output() authenticationError = new EventEmitter();\r\n authenticating = false; // Flag set to true while the service is attempting to authenticate the user\r\n authenticated = false; // Flag set to true when the user is successfully authenticated\r\n authenticatedUser: AuthenticatedUser | undefined; // Object representing the authenticated user\r\n //#endregion\r\n\r\n //#region Properties\r\n get useSessionStorage(): boolean {\r\n return !!localStorage.getItem('storeTokenInSession');\r\n }\r\n\r\n get storage(): Storage {\r\n return this.useSessionStorage ?\r\n sessionStorage:\r\n localStorage;\r\n }\r\n //#endregion\r\n\r\n //#region Lifecycle\r\n constructor(@Optional() protected config: ServiceConfig,\r\n protected http: HttpClient) {\r\n\r\n this.config = this.config ?? new ServiceConfig();\r\n\r\n if (!this.config.deferTokenValidation) {\r\n this.checkForExistingToken();\r\n }\r\n }\r\n //#endregion\r\n\r\n //#region Utilities\r\n //Authenticate the user and store the token in Local Storage\r\n login(username: string, password: string, adminGroup?: string, additionalInfo?: string): void {\r\n const request: AuthenticationRequest = {\r\n username,\r\n password,\r\n adminGroup,\r\n additionalInfo,\r\n appName: this.config.appName\r\n };\r\n\r\n this.authenticating = true;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n\r\n // Sending a 'raw' POST request so that we can tell HttpClient that we are expecting text instead of Json\r\n // Otherwise, it would throw an error trying to decode Json from the response\r\n this.http.request('POST', `${this.config.apiUrl}${this.config.authenticateEndpoint}`, { body: request, responseType: 'text' })\r\n .subscribe({\r\n next: (token) => {\r\n if (token) {\r\n this.validateUser(token);\r\n } else {\r\n this.logout();\r\n }\r\n },\r\n error: (err) => {\r\n this.authenticating = false;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n this.authenticationError.emit(err);\r\n }\r\n });\r\n }\r\n \r\n //Logout the user and delete the token from Local Storage\r\n logout(): void {\r\n if (this.storage.getItem(this.config.tokenName)) {\r\n this.storage.removeItem(this.config.tokenName);\r\n }\r\n\r\n this.authenticatedUser = undefined;\r\n this.authenticated = false;\r\n this.authenticatedChanged.emit(false);\r\n }\r\n \r\n validateUser(token: string): void {\r\n const jwtHelper = new JwtHelperService();\r\n const decoded = jwtHelper.decodeToken(token) as AuthenticationToken;\r\n\r\n if (jwtHelper.isTokenExpired(token)) {\r\n this.logout();\r\n return;\r\n }\r\n\r\n this.authenticatedUser = {\r\n admin: decoded.role === 'Admin',\r\n displayName: decoded.displayName,\r\n accountName: decoded.winaccountname,\r\n distinguishedName: decoded.distinguishedName,\r\n employeeNumber: decoded.employeeNumber,\r\n memberOf: decoded.memberOf\r\n };\r\n\r\n this.storage.setItem(this.config.tokenName, token);\r\n \r\n this.authenticated = true;\r\n this.authenticatedChanged.emit(this.authenticated);\r\n\r\n this.authenticating = false;\r\n this.authenticatingChanged.emit(this.authenticating);\r\n }\r\n\r\n checkForExistingToken(): void {\r\n const token = this.storage.getItem(this.config.tokenName);\r\n if (token) {\r\n this.validateUser(token);\r\n }\r\n }\r\n //#endregion\r\n}","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { ServiceConfig } from './model/service-config';\r\n\r\nimport { AuthenticationService } from './services/authentication.service';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: []\r\n})\r\nexport class TokenModule {\r\n static forRoot(config: ServiceConfig): ModuleWithProviders<TokenModule> {\r\n return {\r\n ngModule: TokenModule,\r\n providers: [\r\n AuthenticationService,\r\n { provide: ServiceConfig, useValue: config }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: TokenModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'TokenModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["BaseServiceConfig","i1.ServiceConfig"],"mappings":";;;;;;;AAAA;AAGM,MAAO,aAAc,SAAQA,eAAiB,CAAA;;AAIhD,IAAA,WAAA,CAAY,sBAA2C,GAAA,KAAK,EACxD,OAAA,GAA8B,SAAS,EACvC,SAAS,GAAG,OAAO,EACnB,oBAAoB,GAAG,qBAAqB,EAAA;QAE5C,KAAK,CAAC,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,CAAC,CAAC;QAR5E,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC;KAS5B;AACJ;;ACDD,MAGa,qBAAqB,CAAA;;;AAWhC,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;KACtD;AAED,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,iBAAiB;AAC3B,YAAA,cAAc;AACd,YAAA,YAAY,CAAC;KAChB;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AA;;2FAIH,WAAW,EAAA,UAAA,EAAA,CAAA;kBAPvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;0BAYc,QAAQ;;0BAAI,QAAQ;;;ACzBnC;;AAEG;;;;"}
|
|
@@ -3,36 +3,36 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { NgModule } from '@angular/core';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
6
|
-
class ServiceConfig extends ServiceConfig$1 {
|
|
7
|
-
// See the comment in the library's main service-config.ts file for an explanation
|
|
8
|
-
constructor(useSsl_or_customApiUrl = false, tokenName = 'token', // The name used as the Key of the item saved in the browser's LocalStorage
|
|
9
|
-
authenticateEndpoint = '/authenticate/token') {
|
|
10
|
-
super(useSsl_or_customApiUrl);
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
|
|
6
|
+
class ServiceConfig extends ServiceConfig$1 {
|
|
7
|
+
// See the comment in the library's main service-config.ts file for an explanation
|
|
8
|
+
constructor(useSsl_or_customApiUrl = false, appName, tokenName = 'token', // The name used as the Key of the item saved in the browser's LocalStorage
|
|
9
|
+
authenticateEndpoint = '/authenticate/token') {
|
|
10
|
+
super(useSsl_or_customApiUrl);
|
|
11
|
+
this.appName = appName;
|
|
12
|
+
this.tokenName = tokenName;
|
|
13
|
+
this.authenticateEndpoint = authenticateEndpoint;
|
|
14
|
+
}
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
class AuthenticationBaseModule {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
-
type: NgModule,
|
|
23
|
-
args: [{
|
|
24
|
-
declarations: [],
|
|
25
|
-
imports: [
|
|
26
|
-
CommonModule
|
|
27
|
-
],
|
|
28
|
-
exports: []
|
|
29
|
-
}]
|
|
17
|
+
class AuthenticationBaseModule {
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationBaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
19
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationBaseModule, imports: [CommonModule] }); }
|
|
20
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationBaseModule, imports: [CommonModule] }); }
|
|
21
|
+
}
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AuthenticationBaseModule, decorators: [{
|
|
23
|
+
type: NgModule,
|
|
24
|
+
args: [{
|
|
25
|
+
declarations: [],
|
|
26
|
+
imports: [
|
|
27
|
+
CommonModule
|
|
28
|
+
],
|
|
29
|
+
exports: []
|
|
30
|
+
}]
|
|
30
31
|
}] });
|
|
31
32
|
|
|
32
|
-
/**
|
|
33
|
-
* Generated bundle index. Do not edit.
|
|
33
|
+
/**
|
|
34
|
+
* Generated bundle index. Do not edit.
|
|
34
35
|
*/
|
|
35
36
|
|
|
36
37
|
export { AuthenticationBaseModule, ServiceConfig };
|
|
37
38
|
//# sourceMappingURL=cleavelandprice-ngx-lib-authentication.mjs.map
|
|
38
|
-
//# sourceMappingURL=cleavelandprice-ngx-lib-authentication.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleavelandprice-ngx-lib-authentication.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/authentication/src/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/src/authentication.base.module.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/src/cleavelandprice-ngx-lib-authentication.ts"],"sourcesContent":["import { ServiceConfig as NgxLibServiceConfig } from '@cleavelandprice/ngx-lib';\r\n\r\nexport class ServiceConfig extends NgxLibServiceConfig {\r\n // See the comment in the library's main service-config.ts file for an explanation\r\n constructor(useSsl_or_customApiUrl: boolean | string = false,\r\n public appName: string | undefined,\r\n public tokenName = 'token', // The name used as the Key of the item saved in the browser's LocalStorage\r\n public authenticateEndpoint = '/authenticate/token'\r\n ) {\r\n super(useSsl_or_customApiUrl);\r\n }\r\n}","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule\r\n ],\r\n exports: []\r\n})\r\nexport class AuthenticationBaseModule {}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["NgxLibServiceConfig"],"mappings":";;;;;AAEM,MAAO,aAAc,SAAQA,eAAmB,CAAA;;IAElD,WAAY,CAAA,sBAAA,GAA2C,KAAK,EACjD,OAA2B,EAC3B,SAAY,GAAA,OAAO;AACnB,IAAA,oBAAA,GAAuB,qBAAqB,EAAA;QAEnD,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAJvB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAoB;QAC3B,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;QACnB,IAAoB,CAAA,oBAAA,GAApB,oBAAoB,CAAwB;KAGtD;AACJ;;ACRD,MAOa,wBAAwB,CAAA;8GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAJjC,YAAY,CAAA,EAAA,CAAA,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