@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
|
@@ -1,652 +0,0 @@
|
|
|
1
|
-
import * as i2 from '@cleavelandprice/ngx-lib/active-directory';
|
|
2
|
-
import { ActiveDirectoryService, ServiceConfig } from '@cleavelandprice/ngx-lib/active-directory';
|
|
3
|
-
export * from '@cleavelandprice/ngx-lib/active-directory';
|
|
4
|
-
import * as i0 from '@angular/core';
|
|
5
|
-
import { Component, Inject, ViewChild, EventEmitter, Output, Input, NgModule, Optional, SkipSelf } from '@angular/core';
|
|
6
|
-
import * as i5 from '@angular/forms';
|
|
7
|
-
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import * as i1 from '@angular/material/dialog';
|
|
9
|
-
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
10
|
-
import * as i10 from '@angular/material/list';
|
|
11
|
-
import { MatSelectionList, MatListModule } from '@angular/material/list';
|
|
12
|
-
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
13
|
-
import { of, forkJoin, debounceTime } from 'rxjs';
|
|
14
|
-
import * as i3 from '@cleavelandprice/ngx-lib/sharepoint';
|
|
15
|
-
import * as i4 from '@angular/common';
|
|
16
|
-
import { CommonModule } from '@angular/common';
|
|
17
|
-
import * as i6 from '@angular/material/button';
|
|
18
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
19
|
-
import * as i7 from '@angular/material/form-field';
|
|
20
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
21
|
-
import * as i8 from '@angular/material/icon';
|
|
22
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
23
|
-
import * as i9 from '@angular/material/input';
|
|
24
|
-
import { MatInputModule } from '@angular/material/input';
|
|
25
|
-
import * as i11 from '@angular/material/progress-spinner';
|
|
26
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
27
|
-
import * as i12 from '@angular/material/slide-toggle';
|
|
28
|
-
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
29
|
-
import * as i13 from '@angular/material/tooltip';
|
|
30
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
31
|
-
import * as i10$1 from '@angular/material/progress-bar';
|
|
32
|
-
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
33
|
-
|
|
34
|
-
class UserChooserFilterOptions {
|
|
35
|
-
constructor() {
|
|
36
|
-
this.accountName = true;
|
|
37
|
-
this.department = true;
|
|
38
|
-
this.groupMembership = false;
|
|
39
|
-
this.phoneNumber = true;
|
|
40
|
-
this.title = true;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var UserChooserMode;
|
|
45
|
-
(function (UserChooserMode) {
|
|
46
|
-
UserChooserMode[UserChooserMode["Single"] = 0] = "Single";
|
|
47
|
-
UserChooserMode[UserChooserMode["Multiple"] = 1] = "Multiple";
|
|
48
|
-
})(UserChooserMode || (UserChooserMode = {}));
|
|
49
|
-
|
|
50
|
-
class UserChooserPreProcessingGroup {
|
|
51
|
-
constructor() {
|
|
52
|
-
this.accountNames = [];
|
|
53
|
-
this.departments = [];
|
|
54
|
-
this.groups = [];
|
|
55
|
-
this.titles = [];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
class UserChooserData {
|
|
60
|
-
constructor() {
|
|
61
|
-
// Should the dialog close automatically when the user chooses an item?
|
|
62
|
-
// Applies to single-user mode only
|
|
63
|
-
this.closeWhenSelectionMade = false;
|
|
64
|
-
// If the component is tasked with pulling Active Directory users (default setting),
|
|
65
|
-
// should that include disabled users?
|
|
66
|
-
this.includeDisabledUsers = false;
|
|
67
|
-
// If true, the component will return an array of Active Directory User objects.
|
|
68
|
-
// If false (default), the component will return an array of user account names.
|
|
69
|
-
this.returnUserObjects = false;
|
|
70
|
-
// Should the dialog include hover tooptips for each user that displays their group membership
|
|
71
|
-
// You probably don't want this, which is why the default is false
|
|
72
|
-
this.showGroupMembershipTooltips = false;
|
|
73
|
-
// Should the user phone number be displayed next to their name in the dialog
|
|
74
|
-
this.showPhone = true;
|
|
75
|
-
// Title displayed in the dialog
|
|
76
|
-
this.title = 'Select User(s)';
|
|
77
|
-
// Single or Multi mode
|
|
78
|
-
this.mode = UserChooserMode.Single;
|
|
79
|
-
// As the user types into the filter field, the list of users is filtered.
|
|
80
|
-
// The filterOptions determine which user properties are taken into consideration for that filter.
|
|
81
|
-
// Note, displayName is always included (hard-coded), and is therefore not a filter option.
|
|
82
|
-
this.filterOptions = new UserChooserFilterOptions();
|
|
83
|
-
this.exclusions = new UserChooserPreProcessingGroup();
|
|
84
|
-
this.inclusions = new UserChooserPreProcessingGroup();
|
|
85
|
-
this.preSelections = new UserChooserPreProcessingGroup();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
class UserChooserComponent {
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region Lifecycle
|
|
92
|
-
constructor(data, dialogRef, activeDirectoryService, sharePointService) {
|
|
93
|
-
this.data = data;
|
|
94
|
-
this.dialogRef = dialogRef;
|
|
95
|
-
this.activeDirectoryService = activeDirectoryService;
|
|
96
|
-
this.sharePointService = sharePointService;
|
|
97
|
-
this.filterInputFocused = false;
|
|
98
|
-
this.filterForm = new FormGroup({
|
|
99
|
-
filter: new FormControl()
|
|
100
|
-
});
|
|
101
|
-
this.data = Object.assign(Object.assign({}, new UserChooserData()), data);
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region Properties
|
|
105
|
-
get isMultiMode() {
|
|
106
|
-
return this.data.mode === UserChooserMode.Multiple;
|
|
107
|
-
}
|
|
108
|
-
get selectedOptions() {
|
|
109
|
-
var _a, _b;
|
|
110
|
-
return (_b = (_a = this.selectionList) === null || _a === void 0 ? void 0 : _a.options.filter(o => o.selected)) !== null && _b !== void 0 ? _b : [];
|
|
111
|
-
}
|
|
112
|
-
get selectedUsers() {
|
|
113
|
-
var _a, _b, _c;
|
|
114
|
-
return (_c = (_b = (_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.filter(d => d.selected)) !== null && _c !== void 0 ? _c : [];
|
|
115
|
-
}
|
|
116
|
-
get filterValue() {
|
|
117
|
-
return this.filterForm.value.filter;
|
|
118
|
-
}
|
|
119
|
-
get adGroupsNeeded() {
|
|
120
|
-
// If any are these are true, then we need to pull AD groups for use later
|
|
121
|
-
return this.data.showGroupMembershipTooltips ||
|
|
122
|
-
this.data.exclusions.groups.length > 0 ||
|
|
123
|
-
this.data.inclusions.groups.length > 0 ||
|
|
124
|
-
this.data.preSelections.groups.length > 0 ||
|
|
125
|
-
this.data.filterOptions.groupMembership;
|
|
126
|
-
}
|
|
127
|
-
ngOnInit() {
|
|
128
|
-
this.getData();
|
|
129
|
-
this.listenForFilterChanges();
|
|
130
|
-
}
|
|
131
|
-
ngAfterViewChecked() {
|
|
132
|
-
var _a;
|
|
133
|
-
if (this.filterInputFocused || !this.filterInput) {
|
|
134
|
-
// Control not ready yet, or it has already been given focus
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
this.filterInputFocused = true;
|
|
138
|
-
(_a = this.filterInput) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region Events
|
|
142
|
-
listSelectionChanged(options) {
|
|
143
|
-
if (this.data.mode === UserChooserMode.Single &&
|
|
144
|
-
this.selectedOptions.length &&
|
|
145
|
-
this.data.closeWhenSelectionMade) {
|
|
146
|
-
this.close();
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
optionSelectionChanged(option) {
|
|
150
|
-
var _a;
|
|
151
|
-
const user = (_a = this.dataSource) === null || _a === void 0 ? void 0 : _a.data.find(u => u.sAMAccountName.toLocaleLowerCase() === option.value.sAMAccountName.toLowerCase());
|
|
152
|
-
if (user) {
|
|
153
|
-
user.selected = option.selected;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
hideUnselectedChanged(selected) {
|
|
157
|
-
var _a;
|
|
158
|
-
(_a = this.filterForm.get('filter')) === null || _a === void 0 ? void 0 : _a.setValue(selected ? '{selected:true}' : null);
|
|
159
|
-
}
|
|
160
|
-
selectAll() {
|
|
161
|
-
var _a, _b, _c;
|
|
162
|
-
(_a = this.selectionList) === null || _a === void 0 ? void 0 : _a.selectAll();
|
|
163
|
-
if ((_b = this.selectionList) === null || _b === void 0 ? void 0 : _b.options) {
|
|
164
|
-
this.listSelectionChanged((_c = this.selectionList) === null || _c === void 0 ? void 0 : _c.options.toArray());
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
deselectAll() {
|
|
168
|
-
var _a;
|
|
169
|
-
(_a = this.selectionList) === null || _a === void 0 ? void 0 : _a.deselectAll();
|
|
170
|
-
}
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region Utilities
|
|
173
|
-
getData() {
|
|
174
|
-
const dataObservables = [
|
|
175
|
-
this.data.users ?
|
|
176
|
-
// Users were passed in
|
|
177
|
-
of(this.data.users) :
|
|
178
|
-
// Users need to be retrieved
|
|
179
|
-
this.activeDirectoryService.getUsers(false, this.data.includeDisabledUsers, this.data.parentOu),
|
|
180
|
-
this.data.photos ?
|
|
181
|
-
// Photos were passed in
|
|
182
|
-
of(this.data.photos) :
|
|
183
|
-
// Photos need to be retrieved
|
|
184
|
-
this.sharePointService.getPhotos()
|
|
185
|
-
];
|
|
186
|
-
// Do we need AD groups?
|
|
187
|
-
if (this.adGroupsNeeded) {
|
|
188
|
-
this.data.groups ?
|
|
189
|
-
// Groups were passed in
|
|
190
|
-
of(this.data.groups) :
|
|
191
|
-
// Groups need to be retrieved
|
|
192
|
-
dataObservables.push(this.activeDirectoryService.getGroups());
|
|
193
|
-
}
|
|
194
|
-
forkJoin(dataObservables)
|
|
195
|
-
//.subscribe(([users, photos]) => {
|
|
196
|
-
.subscribe(data => {
|
|
197
|
-
// Need groups in place before we handle exclusions/inclusions/pre-selections
|
|
198
|
-
this.groups = this.adGroupsNeeded ? data[2] : null;
|
|
199
|
-
let users = data[0];
|
|
200
|
-
users.forEach(u => u.selected = false); // In case existing data was re-used
|
|
201
|
-
users = this.includeUsersByAccountName(users);
|
|
202
|
-
users = this.includeUsersByGroupName(users);
|
|
203
|
-
users = this.includeUsersByDepartment(users);
|
|
204
|
-
users = this.includeUsersByTitle(users);
|
|
205
|
-
users = this.excludeUsersByAccountName(users);
|
|
206
|
-
users = this.excludeUsersByGroupName(users);
|
|
207
|
-
users = this.excludeUsersByDepartment(users);
|
|
208
|
-
users = this.excludeUsersByTitle(users);
|
|
209
|
-
users = this.preSelectUsersByAccountName(users);
|
|
210
|
-
users = this.preSelectUsersByGroupName(users);
|
|
211
|
-
users = this.preSelectUsersByDepartment(users);
|
|
212
|
-
users = this.preSelectUsersByTitle(users);
|
|
213
|
-
this.dataSource = new MatTableDataSource(users);
|
|
214
|
-
this.photos = data[1];
|
|
215
|
-
this.setFilterPredicate();
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
close() {
|
|
219
|
-
if (!this.selectedUsers) {
|
|
220
|
-
this.dialogRef.close();
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
const value = this.selectedUsers
|
|
224
|
-
.map(u => this.data.returnUserObjects ? u : u.sAMAccountName);
|
|
225
|
-
this.dialogRef.close(this.data.mode === UserChooserMode.Multiple ?
|
|
226
|
-
value :
|
|
227
|
-
value[0]);
|
|
228
|
-
}
|
|
229
|
-
getPhoto(user) {
|
|
230
|
-
var _a, _b;
|
|
231
|
-
return (_b = (_a = this.photos) === null || _a === void 0 ? void 0 : _a.find(p => {
|
|
232
|
-
var _a, _b, _c;
|
|
233
|
-
return (p.employeeNumber && p.employeeNumber.toString() === user.employeeNumber) ||
|
|
234
|
-
((_a = p.accountName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === user.sAMAccountName.toLowerCase() ||
|
|
235
|
-
((_b = p.displayName) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === user.displayName.toLowerCase() ||
|
|
236
|
-
((_c = p.title) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === user.displayName.toLowerCase();
|
|
237
|
-
})) === null || _b === void 0 ? void 0 : _b.encodedAbsUrl;
|
|
238
|
-
}
|
|
239
|
-
//#region Exclusions - won't be included in the dataSource at all
|
|
240
|
-
excludeUsersByAccountName(users) {
|
|
241
|
-
this.data.exclusions.accountNames
|
|
242
|
-
.forEach(accountName => {
|
|
243
|
-
const index = users.findIndex(u => u.sAMAccountName.toLowerCase() === accountName.toLowerCase());
|
|
244
|
-
if (index === -1) {
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
users.splice(index, 1);
|
|
248
|
-
});
|
|
249
|
-
return users;
|
|
250
|
-
}
|
|
251
|
-
excludeUsersByGroupName(users) {
|
|
252
|
-
this.data.exclusions.groups
|
|
253
|
-
.forEach(groupName => {
|
|
254
|
-
var _a;
|
|
255
|
-
const group = (_a = this.groups) === null || _a === void 0 ? void 0 : _a.find(g => g.name.toLowerCase() === groupName.toLowerCase());
|
|
256
|
-
if (!group) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
group.member.forEach(groupMemberDn => {
|
|
260
|
-
const index = users.findIndex(u => u.distinguishedName === groupMemberDn);
|
|
261
|
-
if (index === -1) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
users.splice(index, 1);
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
return users;
|
|
268
|
-
}
|
|
269
|
-
excludeUsersByDepartment(users) {
|
|
270
|
-
this.data.exclusions.departments
|
|
271
|
-
.forEach(department => {
|
|
272
|
-
const excludedUsers = users.filter(u => { var _a; return ((_a = u.department) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === department.toLowerCase(); });
|
|
273
|
-
excludedUsers.forEach(user => {
|
|
274
|
-
const index = users.indexOf(user);
|
|
275
|
-
users.splice(index, 1);
|
|
276
|
-
});
|
|
277
|
-
});
|
|
278
|
-
return users;
|
|
279
|
-
}
|
|
280
|
-
excludeUsersByTitle(users) {
|
|
281
|
-
this.data.exclusions.titles
|
|
282
|
-
.forEach(title => {
|
|
283
|
-
const excludedUsers = users.filter(u => { var _a; return ((_a = u.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === title.toLowerCase(); });
|
|
284
|
-
excludedUsers.forEach(user => {
|
|
285
|
-
const index = users.indexOf(user);
|
|
286
|
-
users.splice(index, 1);
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
return users;
|
|
290
|
-
}
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region Inclusions - only these will be included in the dataSource
|
|
293
|
-
includeUsersByAccountName(users) {
|
|
294
|
-
return users.filter(user => this.data.inclusions.accountNames.length === 0 || // No account inclusions specified
|
|
295
|
-
this.data.inclusions.accountNames.find(accountName => accountName.toLowerCase() === user.sAMAccountName.toLowerCase()));
|
|
296
|
-
}
|
|
297
|
-
includeUsersByDepartment(users) {
|
|
298
|
-
return users.filter(user => this.data.inclusions.departments.length === 0 || // No department inclusions specified
|
|
299
|
-
this.data.inclusions.departments.find(department => { var _a; return department.toLowerCase() === ((_a = user.department) === null || _a === void 0 ? void 0 : _a.toLowerCase()); }));
|
|
300
|
-
}
|
|
301
|
-
includeUsersByTitle(users) {
|
|
302
|
-
return users.filter(user => this.data.inclusions.titles.length === 0 || // No title inclusions specified
|
|
303
|
-
this.data.inclusions.titles.find(title => { var _a; return title.toLowerCase() === ((_a = user.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()); }));
|
|
304
|
-
}
|
|
305
|
-
includeUsersByGroupName(users) {
|
|
306
|
-
if (!this.data.inclusions.groups.length) {
|
|
307
|
-
return users; // No group inclusions specified
|
|
308
|
-
}
|
|
309
|
-
// Cheating a bit and leveraging the 'selected' property to keep track of who should be included
|
|
310
|
-
// Since inclusions happen befor pre-selections, we can do that, as long as we set 'selected' back to false when we're done
|
|
311
|
-
this.data.inclusions.groups
|
|
312
|
-
.forEach(groupName => {
|
|
313
|
-
var _a;
|
|
314
|
-
const group = (_a = this.groups) === null || _a === void 0 ? void 0 : _a.find(g => g.name.toLowerCase() === groupName.toLowerCase());
|
|
315
|
-
if (!group) {
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
users
|
|
319
|
-
.filter(user => group.member.find(groupMemberDn => groupMemberDn === user.distinguishedName))
|
|
320
|
-
.forEach(user => user.selected = true);
|
|
321
|
-
});
|
|
322
|
-
// At this point, all of the appropriate users should have 'selected' set to true
|
|
323
|
-
const selectedUsers = users.filter(user => user.selected); // Subset of the original list
|
|
324
|
-
// Reset 'selected' to false, and return
|
|
325
|
-
selectedUsers.forEach(user => user.selected = false);
|
|
326
|
-
return selectedUsers;
|
|
327
|
-
}
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region Pre-Selections
|
|
330
|
-
preSelectUsersByAccountName(users) {
|
|
331
|
-
this.data.preSelections.accountNames
|
|
332
|
-
.forEach(accountName => {
|
|
333
|
-
const user = users.find(u => u.sAMAccountName.toLowerCase() === accountName.toLowerCase());
|
|
334
|
-
if (!user) {
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
user.selected = true;
|
|
338
|
-
});
|
|
339
|
-
return users;
|
|
340
|
-
}
|
|
341
|
-
preSelectUsersByDepartment(users) {
|
|
342
|
-
this.data.preSelections.departments
|
|
343
|
-
.forEach(department => users
|
|
344
|
-
.filter(u => { var _a; return ((_a = u.department) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === department.toLowerCase(); })
|
|
345
|
-
.forEach(user => user.selected = true));
|
|
346
|
-
return users;
|
|
347
|
-
}
|
|
348
|
-
preSelectUsersByTitle(users) {
|
|
349
|
-
this.data.preSelections.titles
|
|
350
|
-
.forEach(title => users
|
|
351
|
-
.filter(u => { var _a; return ((_a = u.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === title.toLowerCase(); })
|
|
352
|
-
.forEach(user => user.selected = true));
|
|
353
|
-
return users;
|
|
354
|
-
}
|
|
355
|
-
preSelectUsersByGroupName(users) {
|
|
356
|
-
this.data.preSelections.groups
|
|
357
|
-
.forEach(groupName => {
|
|
358
|
-
var _a;
|
|
359
|
-
const group = (_a = this.groups) === null || _a === void 0 ? void 0 : _a.find(g => g.name.toLowerCase() === groupName.toLowerCase());
|
|
360
|
-
if (!group) {
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
group.member.forEach(groupMemberDn => {
|
|
364
|
-
const user = users.find(u => u.distinguishedName === groupMemberDn);
|
|
365
|
-
if (!user) {
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
user.selected = true;
|
|
369
|
-
});
|
|
370
|
-
});
|
|
371
|
-
return users;
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
|
-
setFilterPredicate() {
|
|
375
|
-
if (!this.dataSource) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
this.dataSource.filterPredicate = (user, filter) => {
|
|
379
|
-
if (filter === '{selected:true}') {
|
|
380
|
-
return user.selected;
|
|
381
|
-
}
|
|
382
|
-
else {
|
|
383
|
-
const regex = new RegExp(filter, 'i'); // Case-insensitive
|
|
384
|
-
let match = false; // The end result - whether or not a employee matches the filter
|
|
385
|
-
const filterProperties = ['displayName'];
|
|
386
|
-
if (this.data.filterOptions.accountName) {
|
|
387
|
-
filterProperties.push('sAMAccountName');
|
|
388
|
-
}
|
|
389
|
-
if (this.data.filterOptions.title) {
|
|
390
|
-
filterProperties.push('title');
|
|
391
|
-
}
|
|
392
|
-
if (this.data.filterOptions.department) {
|
|
393
|
-
filterProperties.push('department');
|
|
394
|
-
}
|
|
395
|
-
if (this.data.filterOptions.phoneNumber) {
|
|
396
|
-
filterProperties.push('telephoneNumber');
|
|
397
|
-
}
|
|
398
|
-
// Match on the properties configured above
|
|
399
|
-
filterProperties
|
|
400
|
-
.forEach(field => {
|
|
401
|
-
// @ts-ignore
|
|
402
|
-
if (user[field] && user[field].match(regex)) {
|
|
403
|
-
match = true;
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
// Match on group membership (group name)
|
|
407
|
-
if (this.data.filterOptions.groupMembership) {
|
|
408
|
-
user.memberOf.forEach(groupDn => {
|
|
409
|
-
var _a;
|
|
410
|
-
const group = (_a = this.groups) === null || _a === void 0 ? void 0 : _a.find(group => group.distinguishedName === groupDn && group.name.match(regex));
|
|
411
|
-
if (group) {
|
|
412
|
-
match = true;
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
return match;
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
listenForFilterChanges() {
|
|
421
|
-
var _a;
|
|
422
|
-
(_a = this.filterForm.get('filter')) === null || _a === void 0 ? void 0 : _a.valueChanges.pipe(debounceTime(250)).subscribe(() => { var _a; return this.dataSource.filter = (_a = this.filterForm.value.filter) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase(); });
|
|
423
|
-
}
|
|
424
|
-
tooltip(user) {
|
|
425
|
-
return this.data.showGroupMembershipTooltips ?
|
|
426
|
-
user.memberOf
|
|
427
|
-
.map(groupDn => {
|
|
428
|
-
var _a, _b;
|
|
429
|
-
return (_b = (_a = this.groups) === null || _a === void 0 ? void 0 : _a.find(group => group.distinguishedName === groupDn)) === null || _b === void 0 ? void 0 : _b.name;
|
|
430
|
-
})
|
|
431
|
-
.sort((a, b) => a > b ? 1 : -1)
|
|
432
|
-
.join('\n') :
|
|
433
|
-
'';
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
UserChooserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserChooserComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.ActiveDirectoryService }, { token: i3.SharePointService }], target: i0.ɵɵFactoryTarget.Component });
|
|
437
|
-
UserChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: UserChooserComponent, selector: "ng-component", viewQueries: [{ propertyName: "selectionList", first: true, predicate: MatSelectionList, descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], ngImport: i0, template: "<div id=\"dialog-title\">\n <h2 mat-dialog-title>{{ data.title }}</h2>\n\n <div id=\"num-selected\">\n {{ selectedOptions.length }} selected\n </div>\n</div>\n\n<mat-dialog-content>\n <div *ngIf=\"!(dataSource && photos)\">\n <mat-spinner [diameter]=\"50\"></mat-spinner>\n <h2 id=\"spinner-message\">Getting users and photos...</h2>\n </div>\n\n <ng-container *ngIf=\"dataSource && photos\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field *ngIf=\"dataSource\">\n <input matInput placeholder=\"Search\" formControlName=\"filter\" #filterInput>\n\n <button *ngIf=\"filterForm.value.filter\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterForm.get('filter')?.setValue('')\">\n <mat-icon fontIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n </form>\n\n <mat-selection-list [multiple]=\"isMultiMode\"\n (selectionChange)=\"listSelectionChanged($event.options)\">\n\n <mat-list-option *ngFor=\"let user of dataSource?.filteredData\" [value]=\"user\" [selected]=\"user.selected\"\n (selectedChange)=\"optionSelectionChanged(option)\" #option>\n\n <img *ngIf=\"getPhoto(user)\" matListItemAvatar alt=\"\" [src]=\"getPhoto(user)\">\n\n <mat-icon *ngIf=\"!getPhoto(user)\" matListItemAvatar class=\"no-photo\"\n fontIcon=\"account_circle\">\n </mat-icon>\n \n <div class=\"user\">\n <div [matTooltip]=\"tooltip(user)\" class=\"user-name\">\n {{ user.displayName }}\n <div *ngIf=\"data.showPhone && user.telephoneNumber\">{{ user.telephoneNumber }}</div>\n </div>\n \n <div>{{ user.department }}</div>\n \n <div class=\"title\">{{ user.title }}</div>\n </div>\n </mat-list-option>\n </mat-selection-list>\n </ng-container>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <ng-container *ngIf=\"dataSource && photos\">\n <mat-slide-toggle *ngIf=\"selectedOptions.length\" (change)=\"hideUnselectedChanged($event.checked)\">\n Hide Unselected\n </mat-slide-toggle>\n\n <button mat-raised-button color=\"primary\" (click)=\"selectAll()\"\n *ngIf=\"isMultiMode\">\n <mat-icon fontIcon=\"select_all\"></mat-icon>\n <span class=\"hide-mobile\">Select All</span>\n </button>\n \n <button mat-raised-button color=\"primary\" (click)=\"deselectAll()\"\n *ngIf=\"isMultiMode && selectedOptions.length\">\n <mat-icon fontIcon=\"clear_all\"></mat-icon>\n <span class=\"hide-mobile\">Clear All</span>\n </button>\n\n <button *ngIf=\"isMultiMode || !data.closeWhenSelectionMade\" mat-raised-button color=\"primary\" (click)=\"close()\" matTooltip=\"Accept your selection\"\n [disabled]=\"!selectedOptions.length\">\n <mat-icon fontIcon=\"check\"></mat-icon>\n <span class=\"hide-mobile\">Ok</span>\n </button>\n </ng-container>\n\n <button mat-raised-button color=\"warn\" mat-dialog-close matTooltip=\"Close this window\">\n <mat-icon fontIcon=\"close\"></mat-icon>\n <span class=\"hide-mobile\">Cancel</span>\n </button>\n</mat-dialog-actions>", styles: ["::ng-deep .mat-tooltip{font-size:1em!important;white-space:pre-line}mat-dialog-content{min-width:50vw}#dialog-title{display:flex;justify-content:space-between}#num-selected{margin:1em 1em 0 0}mat-spinner{margin:0 auto}#spinner-message{text-align:center;padding:.5em}mat-form-field{width:100%}.title{font-style:italic;color:#757575}img,.no-photo{width:2rem;height:2rem;font-size:2.3rem!important;border-radius:100%}.hide-mobile{display:none}mat-dialog-actions{display:grid;grid-auto-flow:column;grid-gap:1em;justify-content:center}.user-name{display:flex;justify-content:space-between}.user-name>div:last-child{margin-right:10rem;font-weight:400;font-style:italic;color:#757575}@media (min-width:801px){.user{display:grid;grid-template-columns:1fr 1fr 1fr}.user>div:first-child{font-weight:700}.hide-mobile{display:initial}}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i10.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i10.MatListOption, selector: "mat-list-option", inputs: ["checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "directive", type: i10.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "component", type: i11.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i12.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserChooserComponent, decorators: [{
|
|
439
|
-
type: Component,
|
|
440
|
-
args: [{ template: "<div id=\"dialog-title\">\n <h2 mat-dialog-title>{{ data.title }}</h2>\n\n <div id=\"num-selected\">\n {{ selectedOptions.length }} selected\n </div>\n</div>\n\n<mat-dialog-content>\n <div *ngIf=\"!(dataSource && photos)\">\n <mat-spinner [diameter]=\"50\"></mat-spinner>\n <h2 id=\"spinner-message\">Getting users and photos...</h2>\n </div>\n\n <ng-container *ngIf=\"dataSource && photos\">\n <form [formGroup]=\"filterForm\">\n <mat-form-field *ngIf=\"dataSource\">\n <input matInput placeholder=\"Search\" formControlName=\"filter\" #filterInput>\n\n <button *ngIf=\"filterForm.value.filter\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterForm.get('filter')?.setValue('')\">\n <mat-icon fontIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n </form>\n\n <mat-selection-list [multiple]=\"isMultiMode\"\n (selectionChange)=\"listSelectionChanged($event.options)\">\n\n <mat-list-option *ngFor=\"let user of dataSource?.filteredData\" [value]=\"user\" [selected]=\"user.selected\"\n (selectedChange)=\"optionSelectionChanged(option)\" #option>\n\n <img *ngIf=\"getPhoto(user)\" matListItemAvatar alt=\"\" [src]=\"getPhoto(user)\">\n\n <mat-icon *ngIf=\"!getPhoto(user)\" matListItemAvatar class=\"no-photo\"\n fontIcon=\"account_circle\">\n </mat-icon>\n \n <div class=\"user\">\n <div [matTooltip]=\"tooltip(user)\" class=\"user-name\">\n {{ user.displayName }}\n <div *ngIf=\"data.showPhone && user.telephoneNumber\">{{ user.telephoneNumber }}</div>\n </div>\n \n <div>{{ user.department }}</div>\n \n <div class=\"title\">{{ user.title }}</div>\n </div>\n </mat-list-option>\n </mat-selection-list>\n </ng-container>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <ng-container *ngIf=\"dataSource && photos\">\n <mat-slide-toggle *ngIf=\"selectedOptions.length\" (change)=\"hideUnselectedChanged($event.checked)\">\n Hide Unselected\n </mat-slide-toggle>\n\n <button mat-raised-button color=\"primary\" (click)=\"selectAll()\"\n *ngIf=\"isMultiMode\">\n <mat-icon fontIcon=\"select_all\"></mat-icon>\n <span class=\"hide-mobile\">Select All</span>\n </button>\n \n <button mat-raised-button color=\"primary\" (click)=\"deselectAll()\"\n *ngIf=\"isMultiMode && selectedOptions.length\">\n <mat-icon fontIcon=\"clear_all\"></mat-icon>\n <span class=\"hide-mobile\">Clear All</span>\n </button>\n\n <button *ngIf=\"isMultiMode || !data.closeWhenSelectionMade\" mat-raised-button color=\"primary\" (click)=\"close()\" matTooltip=\"Accept your selection\"\n [disabled]=\"!selectedOptions.length\">\n <mat-icon fontIcon=\"check\"></mat-icon>\n <span class=\"hide-mobile\">Ok</span>\n </button>\n </ng-container>\n\n <button mat-raised-button color=\"warn\" mat-dialog-close matTooltip=\"Close this window\">\n <mat-icon fontIcon=\"close\"></mat-icon>\n <span class=\"hide-mobile\">Cancel</span>\n </button>\n</mat-dialog-actions>", styles: ["::ng-deep .mat-tooltip{font-size:1em!important;white-space:pre-line}mat-dialog-content{min-width:50vw}#dialog-title{display:flex;justify-content:space-between}#num-selected{margin:1em 1em 0 0}mat-spinner{margin:0 auto}#spinner-message{text-align:center;padding:.5em}mat-form-field{width:100%}.title{font-style:italic;color:#757575}img,.no-photo{width:2rem;height:2rem;font-size:2.3rem!important;border-radius:100%}.hide-mobile{display:none}mat-dialog-actions{display:grid;grid-auto-flow:column;grid-gap:1em;justify-content:center}.user-name{display:flex;justify-content:space-between}.user-name>div:last-child{margin-right:10rem;font-weight:400;font-style:italic;color:#757575}@media (min-width:801px){.user{display:grid;grid-template-columns:1fr 1fr 1fr}.user>div:first-child{font-weight:700}.hide-mobile{display:initial}}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"] }]
|
|
441
|
-
}], ctorParameters: function () {
|
|
442
|
-
return [{ type: UserChooserData, decorators: [{
|
|
443
|
-
type: Inject,
|
|
444
|
-
args: [MAT_DIALOG_DATA]
|
|
445
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.ActiveDirectoryService }, { type: i3.SharePointService }];
|
|
446
|
-
}, propDecorators: { selectionList: [{
|
|
447
|
-
type: ViewChild,
|
|
448
|
-
args: [MatSelectionList]
|
|
449
|
-
}], filterInput: [{
|
|
450
|
-
type: ViewChild,
|
|
451
|
-
args: ['filterInput']
|
|
452
|
-
}] } });
|
|
453
|
-
|
|
454
|
-
class UserFormFieldComponent {
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region Lifecycle
|
|
457
|
-
constructor(dialog, activeDirectoryService, sharePointService) {
|
|
458
|
-
this.dialog = dialog;
|
|
459
|
-
this.activeDirectoryService = activeDirectoryService;
|
|
460
|
-
this.sharePointService = sharePointService;
|
|
461
|
-
//#region Fields
|
|
462
|
-
this.usersSelected = new EventEmitter(); // string for Single mode, string[] for multi
|
|
463
|
-
this.userUnSelected = new EventEmitter();
|
|
464
|
-
this.placeholder = 'Select User(s)';
|
|
465
|
-
this.clickable = true;
|
|
466
|
-
this.accountNames = [];
|
|
467
|
-
this.users = undefined;
|
|
468
|
-
this.photos = undefined;
|
|
469
|
-
}
|
|
470
|
-
//#endregion
|
|
471
|
-
//#region Properties
|
|
472
|
-
get isEdge() {
|
|
473
|
-
return window.navigator.userAgent.indexOf('Edge') > -1;
|
|
474
|
-
}
|
|
475
|
-
ngOnInit() {
|
|
476
|
-
this.userChooserData = Object.assign(Object.assign({}, new UserChooserData()), this.userChooserData);
|
|
477
|
-
// If users have been pre-selected in the config, store those in accountNames, which drives the UI of this component
|
|
478
|
-
this.accountNames = this.userChooserData.preSelections.accountNames;
|
|
479
|
-
this.getData();
|
|
480
|
-
}
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region Events
|
|
483
|
-
selectUser() {
|
|
484
|
-
if (!this.clickable) {
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
const data = Object.assign(Object.assign({}, this.userChooserData), { users: this.users, photos: this.photos });
|
|
488
|
-
this.dialog.open(UserChooserComponent, {
|
|
489
|
-
data: data
|
|
490
|
-
})
|
|
491
|
-
.afterClosed()
|
|
492
|
-
.subscribe((selected) => {
|
|
493
|
-
if (!selected) {
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
this.accountNames = Array.isArray(selected) ?
|
|
497
|
-
selected :
|
|
498
|
-
[selected];
|
|
499
|
-
// Overwrite what may have been passed in, for subsequent launches of UserChooserComponent - otherwise it just keeps getting fed stale data
|
|
500
|
-
this.userChooserData.preSelections.accountNames = this.accountNames;
|
|
501
|
-
this.usersSelected.emit(selected);
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
unSelectUser(accountName) {
|
|
505
|
-
const index = this.accountNames.findIndex(a => a === accountName);
|
|
506
|
-
this.accountNames.splice(index, 1);
|
|
507
|
-
this.userChooserData.preSelections.accountNames = this.accountNames;
|
|
508
|
-
this.userUnSelected.emit(accountName);
|
|
509
|
-
}
|
|
510
|
-
//#endregion
|
|
511
|
-
//#region Utilities
|
|
512
|
-
getData() {
|
|
513
|
-
forkJoin([
|
|
514
|
-
this.userChooserData.users ?
|
|
515
|
-
// Users were passed in
|
|
516
|
-
of(this.userChooserData.users) :
|
|
517
|
-
// Users need to be retrieved
|
|
518
|
-
this.activeDirectoryService.getUsers(false, this.userChooserData.includeDisabledUsers, this.userChooserData.parentOu),
|
|
519
|
-
this.userChooserData.photos ?
|
|
520
|
-
// Photos were passed in
|
|
521
|
-
of(this.userChooserData.photos) :
|
|
522
|
-
// Photos need to be retrieved
|
|
523
|
-
this.sharePointService.getPhotos()
|
|
524
|
-
])
|
|
525
|
-
.subscribe(([users, photos]) => {
|
|
526
|
-
this.users = users;
|
|
527
|
-
this.photos = photos;
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
getUser(accountName) {
|
|
531
|
-
var _a;
|
|
532
|
-
return (_a = this.users) === null || _a === void 0 ? void 0 : _a.find(u => u.sAMAccountName.toLowerCase() === accountName.toLowerCase());
|
|
533
|
-
}
|
|
534
|
-
getPhoto(accountName) {
|
|
535
|
-
var _a, _b;
|
|
536
|
-
const user = this.getUser(accountName);
|
|
537
|
-
if (!user) {
|
|
538
|
-
return undefined;
|
|
539
|
-
}
|
|
540
|
-
return (_b = (_a = this.photos) === null || _a === void 0 ? void 0 : _a.find(p => {
|
|
541
|
-
var _a, _b, _c;
|
|
542
|
-
return (p.employeeNumber && p.employeeNumber.toString() === user.employeeNumber) ||
|
|
543
|
-
((_a = p.accountName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === user.sAMAccountName.toLowerCase() ||
|
|
544
|
-
((_b = p.displayName) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === user.displayName.toLowerCase() ||
|
|
545
|
-
((_c = p.title) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === user.displayName.toLowerCase();
|
|
546
|
-
})) === null || _b === void 0 ? void 0 : _b.encodedAbsUrl;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
UserFormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserFormFieldComponent, deps: [{ token: i1.MatDialog }, { token: i2.ActiveDirectoryService }, { token: i3.SharePointService }], target: i0.ɵɵFactoryTarget.Component });
|
|
550
|
-
UserFormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: UserFormFieldComponent, selector: "cp-user-field", inputs: { placeholder: "placeholder", clickable: "clickable", userChooserData: "userChooserData" }, outputs: { usersSelected: "usersSelected", userUnSelected: "userUnSelected" }, ngImport: i0, template: "<!-- In Microsoft Edge, selectEmployee() never gets called if the input fields are disabled\n So... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\n It's definitely a better experience if the field IS disabled.\n Otherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\n-->\n\n<mat-progress-bar *ngIf=\"!(users && photos)\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"users && photos\" (click)=\"selectUser()\" [class.clickable]=\"clickable\">\n <mat-form-field *ngIf=\"!accountNames?.length\">\n <input matInput [disabled]=\"!isEdge\" [placeholder]=\"placeholder\">\n </mat-form-field>\n \n <div *ngIf=\"accountNames?.length\"\n [class.grid]=\"accountNames.length > 1\"\n [class.three]=\"accountNames.length > 2\"\n [class.four]=\"accountNames.length > 3\"\n [class.five]=\"accountNames.length > 4\">\n\n <div *ngFor=\"let accountName of accountNames; let i=index\" class=\"user\">\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\n <img *ngIf=\"getPhoto(accountName)\" matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\n \n <mat-form-field>\n <input matInput [disabled]=\"!isEdge\" [placeholder]=\"i === 0 ? placeholder : ''\"\n [value]=\"accountName ? getUser(accountName)?.displayName : accountName\">\n\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\n <mat-icon fontIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n </div>\n </div>\n </div>", styles: [".user{display:grid;grid-template-columns:auto 1fr;grid-gap:.5em;align-items:center}.clickable,.clickable input{cursor:pointer!important}img{width:2em;height:2em;border-radius:100%}@media (min-width:801px){.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:1em}.three{grid-template-columns:repeat(3,1fr)}.four{grid-template-columns:repeat(4,1fr)}.five{grid-template-columns:repeat(5,1fr)}::ng-deep .grid mat-form-field{width:15vw}}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i10.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "component", type: i10$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
|
|
551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: UserFormFieldComponent, decorators: [{
|
|
552
|
-
type: Component,
|
|
553
|
-
args: [{ selector: 'cp-user-field', template: "<!-- In Microsoft Edge, selectEmployee() never gets called if the input fields are disabled\n So... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\n It's definitely a better experience if the field IS disabled.\n Otherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\n-->\n\n<mat-progress-bar *ngIf=\"!(users && photos)\" mode=\"indeterminate\"></mat-progress-bar>\n\n<div *ngIf=\"users && photos\" (click)=\"selectUser()\" [class.clickable]=\"clickable\">\n <mat-form-field *ngIf=\"!accountNames?.length\">\n <input matInput [disabled]=\"!isEdge\" [placeholder]=\"placeholder\">\n </mat-form-field>\n \n <div *ngIf=\"accountNames?.length\"\n [class.grid]=\"accountNames.length > 1\"\n [class.three]=\"accountNames.length > 2\"\n [class.four]=\"accountNames.length > 3\"\n [class.five]=\"accountNames.length > 4\">\n\n <div *ngFor=\"let accountName of accountNames; let i=index\" class=\"user\">\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\n <img *ngIf=\"getPhoto(accountName)\" matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\n \n <mat-form-field>\n <input matInput [disabled]=\"!isEdge\" [placeholder]=\"i === 0 ? placeholder : ''\"\n [value]=\"accountName ? getUser(accountName)?.displayName : accountName\">\n\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\n <mat-icon fontIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n </div>\n </div>\n </div>", styles: [".user{display:grid;grid-template-columns:auto 1fr;grid-gap:.5em;align-items:center}.clickable,.clickable input{cursor:pointer!important}img{width:2em;height:2em;border-radius:100%}@media (min-width:801px){.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:1em}.three{grid-template-columns:repeat(3,1fr)}.four{grid-template-columns:repeat(4,1fr)}.five{grid-template-columns:repeat(5,1fr)}::ng-deep .grid mat-form-field{width:15vw}}\n"] }]
|
|
554
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2.ActiveDirectoryService }, { type: i3.SharePointService }]; }, propDecorators: { usersSelected: [{
|
|
555
|
-
type: Output
|
|
556
|
-
}], userUnSelected: [{
|
|
557
|
-
type: Output
|
|
558
|
-
}], placeholder: [{
|
|
559
|
-
type: Input
|
|
560
|
-
}], clickable: [{
|
|
561
|
-
type: Input
|
|
562
|
-
}], userChooserData: [{
|
|
563
|
-
type: Input
|
|
564
|
-
}] } });
|
|
565
|
-
|
|
566
|
-
class GuiModule {
|
|
567
|
-
constructor(parentModule) {
|
|
568
|
-
if (parentModule) {
|
|
569
|
-
throw new Error('ActiveDirectoryGuiModule is already loaded. Import it in the AppModule only');
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
static forRoot(config) {
|
|
573
|
-
return {
|
|
574
|
-
ngModule: GuiModule,
|
|
575
|
-
providers: [
|
|
576
|
-
ActiveDirectoryService,
|
|
577
|
-
{ provide: ServiceConfig, useValue: config }
|
|
578
|
-
]
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
GuiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: GuiModule, deps: [{ token: GuiModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
583
|
-
GuiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: GuiModule, declarations: [UserChooserComponent,
|
|
584
|
-
UserFormFieldComponent], imports: [CommonModule,
|
|
585
|
-
ReactiveFormsModule,
|
|
586
|
-
MatButtonModule,
|
|
587
|
-
MatDialogModule,
|
|
588
|
-
MatFormFieldModule,
|
|
589
|
-
MatIconModule,
|
|
590
|
-
MatInputModule,
|
|
591
|
-
MatListModule,
|
|
592
|
-
MatProgressBarModule,
|
|
593
|
-
MatProgressSpinnerModule,
|
|
594
|
-
MatSlideToggleModule,
|
|
595
|
-
MatTableModule,
|
|
596
|
-
MatTooltipModule], exports: [UserChooserComponent,
|
|
597
|
-
UserFormFieldComponent] });
|
|
598
|
-
GuiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: GuiModule, imports: [CommonModule,
|
|
599
|
-
ReactiveFormsModule,
|
|
600
|
-
MatButtonModule,
|
|
601
|
-
MatDialogModule,
|
|
602
|
-
MatFormFieldModule,
|
|
603
|
-
MatIconModule,
|
|
604
|
-
MatInputModule,
|
|
605
|
-
MatListModule,
|
|
606
|
-
MatProgressBarModule,
|
|
607
|
-
MatProgressSpinnerModule,
|
|
608
|
-
MatSlideToggleModule,
|
|
609
|
-
MatTableModule,
|
|
610
|
-
MatTooltipModule] });
|
|
611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: GuiModule, decorators: [{
|
|
612
|
-
type: NgModule,
|
|
613
|
-
args: [{
|
|
614
|
-
declarations: [
|
|
615
|
-
UserChooserComponent,
|
|
616
|
-
UserFormFieldComponent
|
|
617
|
-
],
|
|
618
|
-
imports: [
|
|
619
|
-
CommonModule,
|
|
620
|
-
ReactiveFormsModule,
|
|
621
|
-
MatButtonModule,
|
|
622
|
-
MatDialogModule,
|
|
623
|
-
MatFormFieldModule,
|
|
624
|
-
MatIconModule,
|
|
625
|
-
MatInputModule,
|
|
626
|
-
MatListModule,
|
|
627
|
-
MatProgressBarModule,
|
|
628
|
-
MatProgressSpinnerModule,
|
|
629
|
-
MatSlideToggleModule,
|
|
630
|
-
MatTableModule,
|
|
631
|
-
MatTooltipModule
|
|
632
|
-
],
|
|
633
|
-
exports: [
|
|
634
|
-
UserChooserComponent,
|
|
635
|
-
UserFormFieldComponent
|
|
636
|
-
]
|
|
637
|
-
}]
|
|
638
|
-
}], ctorParameters: function () {
|
|
639
|
-
return [{ type: GuiModule, decorators: [{
|
|
640
|
-
type: Optional
|
|
641
|
-
}, {
|
|
642
|
-
type: SkipSelf
|
|
643
|
-
}] }];
|
|
644
|
-
} });
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Generated bundle index. Do not edit.
|
|
648
|
-
*/
|
|
649
|
-
|
|
650
|
-
export { GuiModule, UserChooserComponent, UserChooserData, UserChooserFilterOptions, UserChooserMode, UserChooserPreProcessingGroup, UserFormFieldComponent };
|
|
651
|
-
//# sourceMappingURL=cleavelandprice-ngx-lib-active-directory-gui.mjs.map
|
|
652
|
-
//# sourceMappingURL=cleavelandprice-ngx-lib-active-directory-gui.mjs.map
|