@tuki-io/tuki-widgets 0.0.0-watch
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/README.md +24 -0
- package/di2mt/README.md +42 -0
- package/di2mt/api/api.endpoints.d.ts +20 -0
- package/di2mt/index.d.ts +5 -0
- package/di2mt/public-api.d.ts +12 -0
- package/di2mt/shared/components/card/card.component.d.ts +6 -0
- package/di2mt/shared/components/chart-card/chart-card.component.d.ts +22 -0
- package/di2mt/shared/components/stat-card/stat-card.component.d.ts +14 -0
- package/di2mt/shared/components/status-list-card/status-list-card.component.d.ts +7 -0
- package/di2mt/shared/components/summary-card/summary-card.component.d.ts +9 -0
- package/di2mt/shared/components/table-filters/table-filters.component.d.ts +14 -0
- package/di2mt/shared/material.module.d.ts +15 -0
- package/di2mt/shared/services/api.service.d.ts +20 -0
- package/di2mt/shared/shared.module.d.ts +16 -0
- package/di2mt/shared/types/constants.d.ts +7 -0
- package/di2mt/shared/types/data-table.d.ts +5 -0
- package/di2mt/shared/types/table/filter.d.ts +16 -0
- package/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.d.ts +48 -0
- package/di2mt/widgets/site-upgrade/site-upgrade.module.d.ts +12 -0
- package/di2mt/widgets/site-upgrade/site-upgrade.service.d.ts +12 -0
- package/di2mt/widgets/site-upgrade/types/user-upgrade.d.ts +14 -0
- package/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.d.ts +19 -0
- package/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.d.ts +19 -0
- package/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.d.ts +18 -0
- package/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.d.ts +19 -0
- package/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.d.ts +19 -0
- package/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.d.ts +15 -0
- package/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.d.ts +18 -0
- package/di2mt/widgets/upgrade-overview/types/upgrade-overview.d.ts +56 -0
- package/di2mt/widgets/upgrade-overview/upgrade-overview.module.d.ts +15 -0
- package/di2mt/widgets/upgrade-overview/upgrade-overview.service.d.ts +17 -0
- package/di2mt/widgets/user-upgrade/types/user-upgrade.d.ts +16 -0
- package/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.d.ts +49 -0
- package/di2mt/widgets/user-upgrade/user-upgrade.module.d.ts +12 -0
- package/di2mt/widgets/user-upgrade/user-upgrade.service.d.ts +14 -0
- package/esm2020/di2mt/api/api.endpoints.mjs +21 -0
- package/esm2020/di2mt/public-api.mjs +23 -0
- package/esm2020/di2mt/shared/components/card/card.component.mjs +13 -0
- package/esm2020/di2mt/shared/components/chart-card/chart-card.component.mjs +62 -0
- package/esm2020/di2mt/shared/components/stat-card/stat-card.component.mjs +47 -0
- package/esm2020/di2mt/shared/components/status-list-card/status-list-card.component.mjs +17 -0
- package/esm2020/di2mt/shared/components/summary-card/summary-card.component.mjs +36 -0
- package/esm2020/di2mt/shared/components/table-filters/table-filters.component.mjs +37 -0
- package/esm2020/di2mt/shared/material.module.mjs +76 -0
- package/esm2020/di2mt/shared/services/api.service.mjs +86 -0
- package/esm2020/di2mt/shared/shared.module.mjs +61 -0
- package/esm2020/di2mt/shared/types/constants.mjs +12 -0
- package/esm2020/di2mt/shared/types/data-table.mjs +2 -0
- package/esm2020/di2mt/shared/types/table/filter.mjs +2 -0
- package/esm2020/di2mt/tuki-io-tuki-widgets-di2mt.mjs +5 -0
- package/esm2020/di2mt/widgets/site-upgrade/site-upgrade-data-table/site-upgrade-data-table.component.mjs +182 -0
- package/esm2020/di2mt/widgets/site-upgrade/site-upgrade.module.mjs +40 -0
- package/esm2020/di2mt/widgets/site-upgrade/site-upgrade.service.mjs +43 -0
- package/esm2020/di2mt/widgets/site-upgrade/types/user-upgrade.mjs +3 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/already-upgraded-sites/already-upgraded-sites-card.component.mjs +64 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/already-upgraded-users/already-upgraded-users-card.component.mjs +64 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/preconditions-status-list/preconditions-status-list-card.component.mjs +68 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-sites/ready-to-upgrade-sites-card.component.mjs +45 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/ready-to-upgrade-users/ready-to-upgrade-users-card.component.mjs +45 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/site-infrastructure-status-list/site-infrastructure-status-list-card.component.mjs +64 -0
- package/esm2020/di2mt/widgets/upgrade-overview/cards/upgrade-state-comparison-chart/upgrade-state-comparison-chart-card.component.mjs +74 -0
- package/esm2020/di2mt/widgets/upgrade-overview/types/upgrade-overview.mjs +2 -0
- package/esm2020/di2mt/widgets/upgrade-overview/upgrade-overview.module.mjs +59 -0
- package/esm2020/di2mt/widgets/upgrade-overview/upgrade-overview.service.mjs +82 -0
- package/esm2020/di2mt/widgets/user-upgrade/types/user-upgrade.mjs +3 -0
- package/esm2020/di2mt/widgets/user-upgrade/user-upgrade-data-table/user-upgrade-data-table.component.mjs +197 -0
- package/esm2020/di2mt/widgets/user-upgrade/user-upgrade.module.mjs +40 -0
- package/esm2020/di2mt/widgets/user-upgrade/user-upgrade.service.mjs +58 -0
- package/esm2020/lib/widgets.component.mjs +22 -0
- package/esm2020/lib/widgets.module.mjs +21 -0
- package/esm2020/lib/widgets.service.mjs +14 -0
- package/esm2020/public-api.mjs +7 -0
- package/esm2020/tuki-io-tuki-widgets.mjs +5 -0
- package/esm2020/user-device-manage/public-api.mjs +9 -0
- package/esm2020/user-device-manage/src/app.constants.mjs +95 -0
- package/esm2020/user-device-manage/src/classes/device.mjs +85 -0
- package/esm2020/user-device-manage/src/classes/line-association-interface.mjs +2 -0
- package/esm2020/user-device-manage/src/classes/line-association.mjs +121 -0
- package/esm2020/user-device-manage/src/classes/line-call-info-display.mjs +10 -0
- package/esm2020/user-device-manage/src/classes/line-directory.mjs +27 -0
- package/esm2020/user-device-manage/src/classes/line.mjs +18 -0
- package/esm2020/user-device-manage/src/classes/notification.mjs +32 -0
- package/esm2020/user-device-manage/src/classes/recording-options.mjs +7 -0
- package/esm2020/user-device-manage/src/classes/simplified-user.mjs +111 -0
- package/esm2020/user-device-manage/src/classes/site-defaults.mjs +21 -0
- package/esm2020/user-device-manage/src/classes/translation-pattern.mjs +32 -0
- package/esm2020/user-device-manage/src/classes/types.mjs +24 -0
- package/esm2020/user-device-manage/src/common-functions.mjs +19 -0
- package/esm2020/user-device-manage/src/confirm-dialog/info-dialog.component.mjs +34 -0
- package/esm2020/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.mjs +31 -0
- package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.mjs +16 -0
- package/esm2020/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.mjs +64 -0
- package/esm2020/user-device-manage/src/device-associated-line/device-associated-line.component.mjs +179 -0
- package/esm2020/user-device-manage/src/device-list/device-list.component.mjs +24 -0
- package/esm2020/user-device-manage/src/device-manage-widget.component.mjs +335 -0
- package/esm2020/user-device-manage/src/environments/environment.mjs +11 -0
- package/esm2020/user-device-manage/src/interseptors/auth.interceptor.mjs +36 -0
- package/esm2020/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
- package/esm2020/user-device-manage/src/material.module.mjs +192 -0
- package/esm2020/user-device-manage/src/notifications/notification.component.mjs +35 -0
- package/esm2020/user-device-manage/src/services/api.service.mjs +79 -0
- package/esm2020/user-device-manage/src/services/device.service.mjs +83 -0
- package/esm2020/user-device-manage/src/services/dns.service.mjs +104 -0
- package/esm2020/user-device-manage/src/services/line.service.mjs +76 -0
- package/esm2020/user-device-manage/src/services/notification.service.mjs +62 -0
- package/esm2020/user-device-manage/src/services/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/user-device-manage/src/services/site-settings.service.mjs +70 -0
- package/esm2020/user-device-manage/src/services/sorting-utils.service.mjs +197 -0
- package/esm2020/user-device-manage/src/services/user.service.mjs +243 -0
- package/esm2020/user-device-manage/src/services/utils.service.mjs +87 -0
- package/esm2020/user-device-manage/src/services/validation.service.mjs +760 -0
- package/esm2020/user-device-manage/src/user-device-manage.module.mjs +107 -0
- package/esm2020/user-device-manage/src/utils/app-loader/app-loader.mjs +14 -0
- package/esm2020/user-device-manage/tuki-io-tuki-widgets-user-device-manage.mjs +5 -0
- package/esm2020/user-manage/public-api.mjs +7 -0
- package/esm2020/user-manage/src/app.constants.mjs +50 -0
- package/esm2020/user-manage/src/classes/device.mjs +37 -0
- package/esm2020/user-manage/src/classes/line-association-interface.mjs +2 -0
- package/esm2020/user-manage/src/classes/line-association.mjs +110 -0
- package/esm2020/user-manage/src/classes/line-call-info-display.mjs +10 -0
- package/esm2020/user-manage/src/classes/line-directory.mjs +27 -0
- package/esm2020/user-manage/src/classes/line.mjs +18 -0
- package/esm2020/user-manage/src/classes/notification.mjs +32 -0
- package/esm2020/user-manage/src/classes/pagination.mjs +8 -0
- package/esm2020/user-manage/src/classes/recording-options.mjs +7 -0
- package/esm2020/user-manage/src/classes/simplified-user.mjs +109 -0
- package/esm2020/user-manage/src/classes/table-data.mjs +2 -0
- package/esm2020/user-manage/src/classes/translation-pattern.mjs +32 -0
- package/esm2020/user-manage/src/classes/user-list.mjs +10 -0
- package/esm2020/user-manage/src/common-functions.mjs +19 -0
- package/esm2020/user-manage/src/device-list/device-list.component.mjs +24 -0
- package/esm2020/user-manage/src/environments/environment.mjs +11 -0
- package/esm2020/user-manage/src/interseptors/auth.interceptor.mjs +36 -0
- package/esm2020/user-manage/src/lazy-loading-select/lazy-loading-select.component.mjs +74 -0
- package/esm2020/user-manage/src/material.module.mjs +188 -0
- package/esm2020/user-manage/src/notifications/notification.component.mjs +35 -0
- package/esm2020/user-manage/src/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/user-manage/src/services/api.service.mjs +79 -0
- package/esm2020/user-manage/src/services/dns.service.mjs +110 -0
- package/esm2020/user-manage/src/services/line.service.mjs +34 -0
- package/esm2020/user-manage/src/services/notification.service.mjs +62 -0
- package/esm2020/user-manage/src/services/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/user-manage/src/services/site-settings.service.mjs +36 -0
- package/esm2020/user-manage/src/services/sorting-utils.service.mjs +197 -0
- package/esm2020/user-manage/src/services/user.service.mjs +207 -0
- package/esm2020/user-manage/src/services/users-search.service.mjs +50 -0
- package/esm2020/user-manage/src/services/utils.service.mjs +73 -0
- package/esm2020/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.mjs +65 -0
- package/esm2020/user-manage/src/user-calling/user-calling.component.mjs +78 -0
- package/esm2020/user-manage/src/user-info/user-info.component.mjs +20 -0
- package/esm2020/user-manage/src/user-manage-widget.component.mjs +208 -0
- package/esm2020/user-manage/src/user-manage.module.mjs +99 -0
- package/esm2020/user-manage/src/utils/app-loader/app-loader.mjs +14 -0
- package/esm2020/user-manage/src/utils/pagination/pagination.component.mjs +43 -0
- package/esm2020/user-manage/tuki-io-tuki-widgets-user-manage.mjs +5 -0
- package/esm2020/users-list/public-api.mjs +9 -0
- package/esm2020/users-list/src/app.constants.mjs +54 -0
- package/esm2020/users-list/src/classes/app-location.mjs +32 -0
- package/esm2020/users-list/src/classes/device.mjs +7 -0
- package/esm2020/users-list/src/classes/line.mjs +18 -0
- package/esm2020/users-list/src/classes/move-user.mjs +178 -0
- package/esm2020/users-list/src/classes/notification.mjs +31 -0
- package/esm2020/users-list/src/classes/pagination.mjs +8 -0
- package/esm2020/users-list/src/classes/simlified-user.mjs +50 -0
- package/esm2020/users-list/src/classes/table-data.mjs +2 -0
- package/esm2020/users-list/src/classes/user-list.mjs +14 -0
- package/esm2020/users-list/src/material.module.mjs +209 -0
- package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.mjs +38 -0
- package/esm2020/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.mjs +23 -0
- package/esm2020/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.mjs +189 -0
- package/esm2020/users-list/src/move-user-wizard/move-user-wizard.component.mjs +38 -0
- package/esm2020/users-list/src/services/api-webex.service.mjs +18 -0
- package/esm2020/users-list/src/services/api.service.mjs +78 -0
- package/esm2020/users-list/src/services/dns.service.mjs +120 -0
- package/esm2020/users-list/src/services/events-communication.service.mjs +14 -0
- package/esm2020/users-list/src/services/move-user.service.mjs +53 -0
- package/esm2020/users-list/src/services/notification.service.mjs +62 -0
- package/esm2020/users-list/src/services/removeKynFromIBM.service.mjs +25 -0
- package/esm2020/users-list/src/services/site-settings.service.mjs +27 -0
- package/esm2020/users-list/src/services/user.service.mjs +142 -0
- package/esm2020/users-list/src/services/users-search.service.mjs +122 -0
- package/esm2020/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.mjs +34 -0
- package/esm2020/users-list/src/users-list.component.mjs +287 -0
- package/esm2020/users-list/src/users-list.module.mjs +92 -0
- package/esm2020/users-list/src/utils/app-loader/app-loader.mjs +14 -0
- package/esm2020/users-list/src/utils/common-functions.mjs +32 -0
- package/esm2020/users-list/src/utils/pagination/pagination.component.mjs +43 -0
- package/esm2020/users-list/src/utils/utils.service.mjs +73 -0
- package/esm2020/users-list/tuki-io-tuki-widgets-users-list.mjs +5 -0
- package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs +1469 -0
- package/fesm2015/tuki-io-tuki-widgets-di2mt.mjs.map +1 -0
- package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs +3402 -0
- package/fesm2015/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -0
- package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs +2124 -0
- package/fesm2015/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs +1994 -0
- package/fesm2015/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
- package/fesm2015/tuki-io-tuki-widgets.mjs +63 -0
- package/fesm2015/tuki-io-tuki-widgets.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs +1460 -0
- package/fesm2020/tuki-io-tuki-widgets-di2mt.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs +3364 -0
- package/fesm2020/tuki-io-tuki-widgets-user-device-manage.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs +2107 -0
- package/fesm2020/tuki-io-tuki-widgets-user-manage.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs +1973 -0
- package/fesm2020/tuki-io-tuki-widgets-users-list.mjs.map +1 -0
- package/fesm2020/tuki-io-tuki-widgets.mjs +63 -0
- package/fesm2020/tuki-io-tuki-widgets.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/widgets.component.d.ts +8 -0
- package/lib/widgets.module.d.ts +7 -0
- package/lib/widgets.service.d.ts +6 -0
- package/package.json +65 -0
- package/public-api.d.ts +3 -0
- package/user-device-manage/index.d.ts +5 -0
- package/user-device-manage/public-api.d.ts +8 -0
- package/user-device-manage/src/app.constants.d.ts +74 -0
- package/user-device-manage/src/classes/device.d.ts +233 -0
- package/user-device-manage/src/classes/line-association-interface.d.ts +45 -0
- package/user-device-manage/src/classes/line-association.d.ts +62 -0
- package/user-device-manage/src/classes/line-call-info-display.d.ts +11 -0
- package/user-device-manage/src/classes/line-directory.d.ts +15 -0
- package/user-device-manage/src/classes/line.d.ts +140 -0
- package/user-device-manage/src/classes/notification.d.ts +18 -0
- package/user-device-manage/src/classes/recording-options.d.ts +5 -0
- package/user-device-manage/src/classes/simplified-user.d.ts +52 -0
- package/user-device-manage/src/classes/site-defaults.d.ts +146 -0
- package/user-device-manage/src/classes/translation-pattern.d.ts +19 -0
- package/user-device-manage/src/classes/types.d.ts +19 -0
- package/user-device-manage/src/common-functions.d.ts +1 -0
- package/user-device-manage/src/confirm-dialog/info-dialog.component.d.ts +20 -0
- package/user-device-manage/src/device-associated-line/associated-line-row/associated-line-row.component.d.ts +15 -0
- package/user-device-manage/src/device-associated-line/device-associated-line-details-box/device-associated-line-details-box.component.d.ts +7 -0
- package/user-device-manage/src/device-associated-line/device-associated-line-extension/device-associated-line-extension.component.d.ts +24 -0
- package/user-device-manage/src/device-associated-line/device-associated-line.component.d.ts +89 -0
- package/user-device-manage/src/device-list/device-list.component.d.ts +11 -0
- package/user-device-manage/src/device-manage-widget.component.d.ts +71 -0
- package/user-device-manage/src/environments/environment.d.ts +9 -0
- package/user-device-manage/src/interseptors/auth.interceptor.d.ts +9 -0
- package/user-device-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
- package/user-device-manage/src/material.module.d.ts +29 -0
- package/user-device-manage/src/notifications/notification.component.d.ts +19 -0
- package/user-device-manage/src/services/api.service.d.ts +20 -0
- package/user-device-manage/src/services/device.service.d.ts +21 -0
- package/user-device-manage/src/services/dns.service.d.ts +14 -0
- package/user-device-manage/src/services/line.service.d.ts +33 -0
- package/user-device-manage/src/services/notification.service.d.ts +18 -0
- package/user-device-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
- package/user-device-manage/src/services/site-settings.service.d.ts +25 -0
- package/user-device-manage/src/services/sorting-utils.service.d.ts +26 -0
- package/user-device-manage/src/services/user.service.d.ts +51 -0
- package/user-device-manage/src/services/utils.service.d.ts +10 -0
- package/user-device-manage/src/services/validation.service.d.ts +165 -0
- package/user-device-manage/src/user-device-manage.module.d.ts +22 -0
- package/user-device-manage/src/utils/app-loader/app-loader.d.ts +6 -0
- package/user-manage/index.d.ts +5 -0
- package/user-manage/public-api.d.ts +6 -0
- package/user-manage/src/app.constants.d.ts +29 -0
- package/user-manage/src/classes/device.d.ts +203 -0
- package/user-manage/src/classes/line-association-interface.d.ts +40 -0
- package/user-manage/src/classes/line-association.d.ts +55 -0
- package/user-manage/src/classes/line-call-info-display.d.ts +11 -0
- package/user-manage/src/classes/line-directory.d.ts +16 -0
- package/user-manage/src/classes/line.d.ts +140 -0
- package/user-manage/src/classes/notification.d.ts +18 -0
- package/user-manage/src/classes/pagination.d.ts +13 -0
- package/user-manage/src/classes/recording-options.d.ts +5 -0
- package/user-manage/src/classes/simplified-user.d.ts +50 -0
- package/user-manage/src/classes/table-data.d.ts +5 -0
- package/user-manage/src/classes/translation-pattern.d.ts +18 -0
- package/user-manage/src/classes/user-list.d.ts +34 -0
- package/user-manage/src/common-functions.d.ts +1 -0
- package/user-manage/src/device-list/device-list.component.d.ts +11 -0
- package/user-manage/src/environments/environment.d.ts +9 -0
- package/user-manage/src/interseptors/auth.interceptor.d.ts +9 -0
- package/user-manage/src/lazy-loading-select/lazy-loading-select.component.d.ts +35 -0
- package/user-manage/src/material.module.d.ts +28 -0
- package/user-manage/src/notifications/notification.component.d.ts +19 -0
- package/user-manage/src/removeKynFromIBM.service.d.ts +8 -0
- package/user-manage/src/services/api.service.d.ts +21 -0
- package/user-manage/src/services/dns.service.d.ts +14 -0
- package/user-manage/src/services/line.service.d.ts +17 -0
- package/user-manage/src/services/notification.service.d.ts +18 -0
- package/user-manage/src/services/removeKynFromIBM.service.d.ts +8 -0
- package/user-manage/src/services/site-settings.service.d.ts +9 -0
- package/user-manage/src/services/sorting-utils.service.d.ts +26 -0
- package/user-manage/src/services/user.service.d.ts +43 -0
- package/user-manage/src/services/users-search.service.d.ts +25 -0
- package/user-manage/src/services/utils.service.d.ts +9 -0
- package/user-manage/src/user-calling/user-calling-extension/user-calling-extension.component.d.ts +24 -0
- package/user-manage/src/user-calling/user-calling.component.d.ts +30 -0
- package/user-manage/src/user-info/user-info.component.d.ts +9 -0
- package/user-manage/src/user-manage-widget.component.d.ts +45 -0
- package/user-manage/src/user-manage.module.d.ts +21 -0
- package/user-manage/src/utils/app-loader/app-loader.d.ts +6 -0
- package/user-manage/src/utils/pagination/pagination.component.d.ts +18 -0
- package/users-list/index.d.ts +5 -0
- package/users-list/public-api.d.ts +8 -0
- package/users-list/src/app.constants.d.ts +36 -0
- package/users-list/src/classes/app-location.d.ts +17 -0
- package/users-list/src/classes/device.d.ts +224 -0
- package/users-list/src/classes/line.d.ts +140 -0
- package/users-list/src/classes/move-user.d.ts +85 -0
- package/users-list/src/classes/notification.d.ts +18 -0
- package/users-list/src/classes/pagination.d.ts +13 -0
- package/users-list/src/classes/simlified-user.d.ts +25 -0
- package/users-list/src/classes/table-data.d.ts +5 -0
- package/users-list/src/classes/user-list.d.ts +36 -0
- package/users-list/src/material.module.d.ts +31 -0
- package/users-list/src/move-user-wizard/move-user-stepper/device-move-user/device-move-user-wizard.component.d.ts +21 -0
- package/users-list/src/move-user-wizard/move-user-stepper/device-move-user-tab/devices-move-user-wizard-tab.component.d.ts +12 -0
- package/users-list/src/move-user-wizard/move-user-stepper/move-user-stepper.component.d.ts +55 -0
- package/users-list/src/move-user-wizard/move-user-wizard.component.d.ts +17 -0
- package/users-list/src/services/api-webex.service.d.ts +8 -0
- package/users-list/src/services/api.service.d.ts +21 -0
- package/users-list/src/services/dns.service.d.ts +18 -0
- package/users-list/src/services/events-communication.service.d.ts +8 -0
- package/users-list/src/services/move-user.service.d.ts +17 -0
- package/users-list/src/services/notification.service.d.ts +18 -0
- package/users-list/src/services/removeKynFromIBM.service.d.ts +8 -0
- package/users-list/src/services/site-settings.service.d.ts +11 -0
- package/users-list/src/services/user.service.d.ts +35 -0
- package/users-list/src/services/users-search.service.d.ts +34 -0
- package/users-list/src/user-list-confirm-dialog/user-list-confirm-dialog.component.d.ts +20 -0
- package/users-list/src/users-list.component.d.ts +60 -0
- package/users-list/src/users-list.module.d.ts +18 -0
- package/users-list/src/utils/app-loader/app-loader.d.ts +6 -0
- package/users-list/src/utils/common-functions.d.ts +2 -0
- package/users-list/src/utils/pagination/pagination.component.d.ts +18 -0
- package/users-list/src/utils/utils.service.d.ts +9 -0
|
@@ -0,0 +1,3364 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, ViewEncapsulation, NgModule, ChangeDetectionStrategy, EventEmitter, Input, Output, Inject, ViewChild } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HttpHeaders, HttpErrorResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
5
|
+
import { map, catchError } from 'rxjs/operators';
|
|
6
|
+
import { Subject, of, forkJoin, throwError, Observable } from 'rxjs';
|
|
7
|
+
import * as i9 from '@angular/forms';
|
|
8
|
+
import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
10
|
+
import * as i5 from '@angular/material/progress-spinner';
|
|
11
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
12
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
13
|
+
import * as i8 from '@angular/common';
|
|
14
|
+
import { CommonModule } from '@angular/common';
|
|
15
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
16
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
17
|
+
import * as i12 from '@angular/material/autocomplete';
|
|
18
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
19
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
20
|
+
import { MatListModule } from '@angular/material/list';
|
|
21
|
+
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
22
|
+
import { MatTreeModule } from '@angular/material/tree';
|
|
23
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
24
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
25
|
+
import * as i11 from '@angular/material/input';
|
|
26
|
+
import { MatInputModule } from '@angular/material/input';
|
|
27
|
+
import * as i13 from '@angular/material/core';
|
|
28
|
+
import { MatNativeDateModule } from '@angular/material/core';
|
|
29
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
30
|
+
import * as i6 from '@angular/material/form-field';
|
|
31
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
32
|
+
import { MatStepperModule } from '@angular/material/stepper';
|
|
33
|
+
import * as i14 from '@angular/material/tabs';
|
|
34
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
35
|
+
import { MatCardModule } from '@angular/material/card';
|
|
36
|
+
import * as i8$1 from '@angular/material/select';
|
|
37
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
38
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
39
|
+
import * as i2 from '@angular/material/slide-toggle';
|
|
40
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
41
|
+
import { MatTableModule } from '@angular/material/table';
|
|
42
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
43
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
44
|
+
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
45
|
+
import * as Big from 'big.js';
|
|
46
|
+
import * as i10 from '@angular/material/divider';
|
|
47
|
+
|
|
48
|
+
class APIService {
|
|
49
|
+
constructor(httpClient) {
|
|
50
|
+
this.httpClient = httpClient;
|
|
51
|
+
this.apiUrl = window.location.protocol + '//' + window.location.hostname + '/dcp';
|
|
52
|
+
}
|
|
53
|
+
fetch(url, params, cache) {
|
|
54
|
+
const headers = this.getHeaders(cache);
|
|
55
|
+
params = params || {};
|
|
56
|
+
return this.httpClient.get(this.apiUrl + url, { params: this.prepareEncodedParams(params), headers });
|
|
57
|
+
}
|
|
58
|
+
post(url, body, params = {}) {
|
|
59
|
+
body = body || null;
|
|
60
|
+
const headers = this.getHeaders();
|
|
61
|
+
return this.httpClient.post(this.apiUrl + url, body, { params: this.prepareEncodedParams(params), headers });
|
|
62
|
+
}
|
|
63
|
+
// use when response extended data is necessary:
|
|
64
|
+
postExtended(url, body = null, params = {}, headers = {}) {
|
|
65
|
+
headers = headers || this.getHeaders();
|
|
66
|
+
return this.httpClient.post(this.apiUrl + url, body, {
|
|
67
|
+
headers,
|
|
68
|
+
observe: 'response',
|
|
69
|
+
params: this.prepareEncodedParams(params)
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
put(url, body = null, params = {}) {
|
|
73
|
+
const headers = this.getHeaders();
|
|
74
|
+
return this.httpClient.put(this.apiUrl + url, body, { headers, params: this.prepareEncodedParams(params) });
|
|
75
|
+
}
|
|
76
|
+
delete(url, params = {}) {
|
|
77
|
+
const headers = this.getHeaders();
|
|
78
|
+
return this.httpClient.delete(this.apiUrl + url, { headers, params: this.prepareEncodedParams(params) });
|
|
79
|
+
}
|
|
80
|
+
fetchPagination(url, pageSize, pageNumber, additionalParams = {}, cache) {
|
|
81
|
+
const copyAdditionalParams = JSON.parse(JSON.stringify(additionalParams));
|
|
82
|
+
const params = Object.assign(copyAdditionalParams, { size: pageSize.toString(), page: pageNumber.toString() });
|
|
83
|
+
return this.fetch(url, params, cache);
|
|
84
|
+
}
|
|
85
|
+
prepareEncodedParams(params) {
|
|
86
|
+
const result = {};
|
|
87
|
+
if (!params) {
|
|
88
|
+
return {};
|
|
89
|
+
}
|
|
90
|
+
for (const key of Object.keys(params)) {
|
|
91
|
+
if (params[key]) {
|
|
92
|
+
const stringParam = params[key].toString();
|
|
93
|
+
result[key] = stringParam.includes('+') ? encodeURIComponent(stringParam) : stringParam;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
getHeaders(cache) {
|
|
99
|
+
let headers = new HttpHeaders();
|
|
100
|
+
if (cache) {
|
|
101
|
+
headers = headers.append('_Cache', 'true ');
|
|
102
|
+
}
|
|
103
|
+
const token = this.token || this.getParameterByName('token');
|
|
104
|
+
headers = headers.append('Authorization', 'Bearer ' + token);
|
|
105
|
+
return headers;
|
|
106
|
+
}
|
|
107
|
+
getParameterByName(name, url = window.location.href) {
|
|
108
|
+
name = name.replace(/[\[\]]/g, '\\$&');
|
|
109
|
+
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);
|
|
110
|
+
if (!results)
|
|
111
|
+
return null;
|
|
112
|
+
if (!results[2])
|
|
113
|
+
return '';
|
|
114
|
+
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
APIService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
118
|
+
APIService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService });
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: APIService, decorators: [{
|
|
120
|
+
type: Injectable
|
|
121
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
122
|
+
|
|
123
|
+
const API = {
|
|
124
|
+
USER_TOKEN: '/api/provision/:siteId/users/:userId/token',
|
|
125
|
+
UPDATE_USER_FIELDS: '/api/provision/:siteId/userFields/:token',
|
|
126
|
+
PERSIST_USER_CACHE: '/api/provision/:siteId/saveUser/:token',
|
|
127
|
+
USER_BY_ID: '/api/provision/:siteId/users/:userId',
|
|
128
|
+
QUICK_USERS_SEARCH: "/api/search/quickusers",
|
|
129
|
+
LOCATION: "/api/provision/options/:siteId/locations",
|
|
130
|
+
USER_LOCALES: "/api/provision/options/:siteId/userlocales",
|
|
131
|
+
USER_PROFILES: "/api/provision/options/:siteId/userprofiles",
|
|
132
|
+
RECORDING_PROFILE: "/api/provision/options/:siteId/recordingprofiles",
|
|
133
|
+
AVAILABLE_DN_IN_RANGES: "/api/sites/:siteId/available-dn-in-ranges",
|
|
134
|
+
DELETE_LINE: "/api/provision/:siteId/deleteLine/:pkid/:token",
|
|
135
|
+
DISASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/deleteLineAssociation/:linePkid/:token",
|
|
136
|
+
CHECK_DELETE_LINE: "/api/provision/:siteId/checklinedeletion",
|
|
137
|
+
ASSOCIATE_LINE: "/api/provision/:siteId/:deviceName/createLineAssociation/:token",
|
|
138
|
+
CHECK_DESTINATION_NUMBER: "/api/provision/:siteId/check-dn",
|
|
139
|
+
UPDATE_LINE_FIELDS: "/api/provision/:siteId/lineFields/:pkid/:token",
|
|
140
|
+
UPDATE_DEVICE_FIELDS: "/api/provision/:siteId/deviceFields/:deviceName/:token",
|
|
141
|
+
SOFTKEY_TEMPLATES: "/api/provision/options/:siteId/softkeytemplates",
|
|
142
|
+
SITE_SETTINGS: "/api/sites/:siteId/settings",
|
|
143
|
+
LINE_SLOTS: "/api/provision/:siteId/buttontemplate",
|
|
144
|
+
LEAN_USER_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/leanUserDetailsToken",
|
|
145
|
+
LEAN_USER_DEVICES_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/leanUserDevicesToken",
|
|
146
|
+
LEAN_USER_LINES_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/:leanUserDevicesToken/leanUserLinesToken",
|
|
147
|
+
LEAN_USER_SNR_CONVERSATION_START: "/api/provision/:siteId/leanUsers/:userId/leanUserSNRToken",
|
|
148
|
+
DEVICE_LINE_MONITOR_CSS: "/api/provision/options/:siteId/callingSearchSpace"
|
|
149
|
+
};
|
|
150
|
+
const REGEX_PATTERN = {
|
|
151
|
+
EMAIL: '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))' +
|
|
152
|
+
'@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])' +
|
|
153
|
+
'?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?)*$'
|
|
154
|
+
};
|
|
155
|
+
const PAGINATION_DEFAULTS = {
|
|
156
|
+
SIZE: 10,
|
|
157
|
+
INDEX: 0
|
|
158
|
+
};
|
|
159
|
+
const PAGINATION_SIZE_OPTIONS = [
|
|
160
|
+
10,
|
|
161
|
+
50,
|
|
162
|
+
100,
|
|
163
|
+
500
|
|
164
|
+
];
|
|
165
|
+
const CUCS_TO_IGNORE = [
|
|
166
|
+
189,
|
|
167
|
+
194,
|
|
168
|
+
191,
|
|
169
|
+
190
|
|
170
|
+
];
|
|
171
|
+
const CUCMS_TO_IGNORE = [
|
|
172
|
+
249,
|
|
173
|
+
255,
|
|
174
|
+
251,
|
|
175
|
+
250
|
|
176
|
+
];
|
|
177
|
+
const RECORDING_MEDIA_SOURCE = [
|
|
178
|
+
"Gateway Preferred",
|
|
179
|
+
"Phone Preferred"
|
|
180
|
+
];
|
|
181
|
+
const STATIC_OPTIONS = {
|
|
182
|
+
CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_ACTIVE: ['Use System Default', 'Disable', 'Beep Only'],
|
|
183
|
+
CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_IDLE: ['Use System Default', 'Disable', 'Ring Once'],
|
|
184
|
+
CONF_ACCESS_MODE: ['Fixed', 'Variable'],
|
|
185
|
+
DEFAULT_ON_OFF: ['Default', 'On', 'Off'],
|
|
186
|
+
DEFAULT_EN_DIS: ['Default', 'Enabled', 'Disabled'],
|
|
187
|
+
DND: ['Use Common Phone Profile Setting', 'Call Reject', 'Ringer Off'],
|
|
188
|
+
DND_INCOMING_CALL_ALLERT: ['Disable', 'Flash Only', 'Beep Only'],
|
|
189
|
+
LATENT_CAPABILITY: ['Gateway Controlled', 'Modem Relay', 'Modem Passthrough', 'Modem Relay and Passthrough', 'None'],
|
|
190
|
+
LINE_MODE: ['Session Line mode', 'Enhanced Line mode'],
|
|
191
|
+
ACTIONABLE_ALERT: ['Disabled', 'Show for all Incoming Call', 'Show for Invisible Incoming Call'],
|
|
192
|
+
MLPP_PREEMPTION: ['Default', 'Forceful', 'Disabled'],
|
|
193
|
+
PACKET_CAPTURE_MODE: ['None', 'Batch Processing Mode'],
|
|
194
|
+
RING_VOLUME: ['0-Silent', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'],
|
|
195
|
+
PORT_DIRECTION: ['Bothways', 'Inbound', 'Outbound'],
|
|
196
|
+
RING_SETTING_IDLE: ['Use System Default', 'Disable', 'Flash Only', 'Ring Once', 'Ring'],
|
|
197
|
+
RING_SETTING_ACTIVE: ['Use System Default', 'Disable', 'Flash Only', 'Ring Once', 'Ring', 'Beep Only'],
|
|
198
|
+
SERVICE_PROVISIONING: ['Default', 'Internal', 'External URL', 'Both'],
|
|
199
|
+
SETTINGS_ACCES: ['Enabled', 'Disabled', 'Restricted'],
|
|
200
|
+
VISUAL_MWI: ['Use System Policy', 'Light and Prompt', 'Prompt Only', 'Light Only', 'None'],
|
|
201
|
+
WEEKDAYS: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
202
|
+
BUILD_BRIDGE: ['None', 'On', 'Off', 'Default'],
|
|
203
|
+
TRANSFER_TYPES: ['Release to Switch', 'Supervise Transfer'],
|
|
204
|
+
EXTENSION_IS_BUSY_TYPES: ['Send Callers to Voicemail', 'Put Callers on Hold Without Asking', 'Ask Callers to Hold'],
|
|
205
|
+
CALL_ACTIONS: ['Hang Up', 'Restart Greeting', 'Route From Next Call Routing Rule', 'Take Message'],
|
|
206
|
+
AUTHENTICATION_802: ['User controlled', 'Disabled', 'Enabled'],
|
|
207
|
+
CERTIFICATE_OPERATION: ['No Pending Operation', 'Install/Upgrade', 'Delete', 'Troubleshoot'],
|
|
208
|
+
AUTHENTICATION_MODE: ['By Authentication String', 'By Null String', 'By Existing Certificate (precedence to LSC)', 'By Existing Certificate (precedence to MIC)'],
|
|
209
|
+
KEY_ORDER: ['RSA Only', 'EC Only', 'EC Preferred, RSA Backup'],
|
|
210
|
+
RSA_KEY_SIZE: ['512', '1024', '2048'],
|
|
211
|
+
RSA_KEY_SIZE_SPECIFIC_DEVICE: ['512', '1024', '2048', '3072', '4096']
|
|
212
|
+
};
|
|
213
|
+
const TOGGLE_TYPES = {
|
|
214
|
+
TABS: 'TABS',
|
|
215
|
+
ASSOCIATED_LINE_ONLY: 'ASSOCIATED_LINE_ONLY'
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
class SiteDefaults {
|
|
219
|
+
constructor(siteDefaults, isSharedLineSite) {
|
|
220
|
+
this.routePartitionFilter = [];
|
|
221
|
+
this.devicePoolFilter = [];
|
|
222
|
+
this.cssFilter = [];
|
|
223
|
+
this.voicemailProfileFilter = [];
|
|
224
|
+
if (siteDefaults) {
|
|
225
|
+
Object.assign(this, siteDefaults);
|
|
226
|
+
this.enableEm = siteDefaults.enableEm === 'true';
|
|
227
|
+
this.routePartitionFilter?.sort();
|
|
228
|
+
this.devicePoolFilter?.sort();
|
|
229
|
+
this.cssFilter?.sort();
|
|
230
|
+
this.voicemailProfileFilter?.sort();
|
|
231
|
+
}
|
|
232
|
+
/*if (isSharedLineSite && siteDefaults) {
|
|
233
|
+
this.cssFilter = siteDefaults?.sharedSitesCssFilter;
|
|
234
|
+
this.routePartitionFilter = siteDefaults?.sharedSitesRPFilter;
|
|
235
|
+
}*/
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const urlMap = {
|
|
240
|
+
locations: API.LOCATION,
|
|
241
|
+
userLocales: API.USER_LOCALES,
|
|
242
|
+
userProfiles: API.USER_PROFILES,
|
|
243
|
+
recordingProfile: API.RECORDING_PROFILE,
|
|
244
|
+
};
|
|
245
|
+
class SiteSettingsService {
|
|
246
|
+
get callingSearchSpaceTypes() {
|
|
247
|
+
return this.siteDefaults?.cssFilter || [];
|
|
248
|
+
}
|
|
249
|
+
get devicePools() {
|
|
250
|
+
return this.siteDefaults?.devicePoolFilter || [];
|
|
251
|
+
}
|
|
252
|
+
constructor(apiService) {
|
|
253
|
+
this.apiService = apiService;
|
|
254
|
+
this.options = {};
|
|
255
|
+
}
|
|
256
|
+
getSelectionOptions(siteId, token) {
|
|
257
|
+
if (!siteId) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
// @ts-ignore
|
|
261
|
+
const URL = urlMap[token];
|
|
262
|
+
return this.apiService.fetch(URL.replace(':siteId', String(siteId)))
|
|
263
|
+
.pipe(map((res) => {
|
|
264
|
+
this.options[token] = res;
|
|
265
|
+
return this.options;
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
268
|
+
getDeviceSoftkeyTemplates(siteId) {
|
|
269
|
+
// @ts-ignore
|
|
270
|
+
return this.apiService.fetch(API.SOFTKEY_TEMPLATES.replace(':siteId', String(siteId)), null, false)
|
|
271
|
+
.pipe(map((templates) => this.deviceSoftkeyTemplates = templates));
|
|
272
|
+
// .pipe(this.handleError(false, true));
|
|
273
|
+
}
|
|
274
|
+
getSiteDefaults(siteId, directAccess, sharedLineSiteIds) {
|
|
275
|
+
/*const params = {directAccess: directAccess};
|
|
276
|
+
if (sharedLineSiteIds) {
|
|
277
|
+
// @ts-ignore
|
|
278
|
+
params['sharedLineSiteIds'] = sharedLineSiteIds;
|
|
279
|
+
}*/
|
|
280
|
+
return this.apiService.fetch(API.SITE_SETTINGS.replace(':siteId', String(siteId)), {})
|
|
281
|
+
.pipe(map((siteDefaults) => {
|
|
282
|
+
this.siteDefaults = new SiteDefaults(siteDefaults, !!sharedLineSiteIds);
|
|
283
|
+
const copiedSiteDefaults = JSON.parse(JSON.stringify(siteDefaults));
|
|
284
|
+
this.originalSiteDefaults = new SiteDefaults(copiedSiteDefaults, !!sharedLineSiteIds);
|
|
285
|
+
}));
|
|
286
|
+
// .pipe(this.handleError(true, true));
|
|
287
|
+
}
|
|
288
|
+
getMonitorCss(siteId) {
|
|
289
|
+
return this.apiService.fetch(API.DEVICE_LINE_MONITOR_CSS.replace(':siteId', String(siteId)), null);
|
|
290
|
+
// .pipe(this.handleError(false, true));
|
|
291
|
+
}
|
|
292
|
+
getRecordingProfile(siteId) {
|
|
293
|
+
return this.apiService.fetch(API.RECORDING_PROFILE.replace(':siteId', String(siteId)), null);
|
|
294
|
+
// .pipe(this.handleError(false, true));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
SiteSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
298
|
+
SiteSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService });
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SiteSettingsService, decorators: [{
|
|
300
|
+
type: Injectable
|
|
301
|
+
}], ctorParameters: function () { return [{ type: APIService }]; } });
|
|
302
|
+
|
|
303
|
+
const getSavableData = (model, exclude) => {
|
|
304
|
+
let result = Object.keys(model);
|
|
305
|
+
if (exclude && exclude.length) {
|
|
306
|
+
result = result.filter(key => !exclude.some(item => item === key));
|
|
307
|
+
}
|
|
308
|
+
return result.reduce((result, key) => {
|
|
309
|
+
if (model[key] instanceof Array && model[key].length && model[key][0].getSavableData) {
|
|
310
|
+
result[key] = model[key].map((item) => item.getSavableData());
|
|
311
|
+
}
|
|
312
|
+
else if (model[key] instanceof Object && model[key].getSavableData) {
|
|
313
|
+
result[key] = model[key].getSavableData();
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
result[key] = model[key];
|
|
317
|
+
}
|
|
318
|
+
return result;
|
|
319
|
+
}, {});
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
class LineDirectory {
|
|
323
|
+
constructor(lineDirectory) {
|
|
324
|
+
Object.assign(this, lineDirectory || {});
|
|
325
|
+
// @ts-ignore
|
|
326
|
+
if (this.directoryNumber && this.routePartitionName) {
|
|
327
|
+
this.displayValue = `${this.directoryNumber}/${this.routePartitionName}`;
|
|
328
|
+
}
|
|
329
|
+
this.initForm();
|
|
330
|
+
}
|
|
331
|
+
getSavableData() {
|
|
332
|
+
return getSavableData(this, ['form', 'displayValue', 'templateDirectoryNumber']);
|
|
333
|
+
}
|
|
334
|
+
equal(itemToCompare) {
|
|
335
|
+
return JSON.stringify(this.getSavableData()) === JSON.stringify(itemToCompare.getSavableData());
|
|
336
|
+
}
|
|
337
|
+
initForm() {
|
|
338
|
+
const formBuilder = new FormBuilder();
|
|
339
|
+
const formSettings = {
|
|
340
|
+
directoryNumber: [{ value: this.directoryNumber || '', disabled: true }, [Validators.required]],
|
|
341
|
+
routePartitionName: [{ value: this.routePartitionName || '', disabled: true }]
|
|
342
|
+
};
|
|
343
|
+
this.form = formBuilder.group(formSettings);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
class LineCallInfoDisplay {
|
|
348
|
+
constructor(lineCallInfoDisplay) {
|
|
349
|
+
Object.assign(this, lineCallInfoDisplay || {});
|
|
350
|
+
}
|
|
351
|
+
getSavableData() {
|
|
352
|
+
return getSavableData(this, ['form']);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
class TranslationPattern {
|
|
357
|
+
constructor(translationPattern) {
|
|
358
|
+
Object.assign(this, translationPattern || {});
|
|
359
|
+
this.initForm();
|
|
360
|
+
}
|
|
361
|
+
getSavableData() {
|
|
362
|
+
return getSavableData(this, ['form', 'isNewForExistingLine']);
|
|
363
|
+
}
|
|
364
|
+
initForm() {
|
|
365
|
+
const formBuilder = new FormBuilder();
|
|
366
|
+
const formSettings = {
|
|
367
|
+
pattern: [{ value: this.pattern || '' }],
|
|
368
|
+
calledPartyTransformationMask: [{ value: this.calledPartyTransformationMask || '' }]
|
|
369
|
+
};
|
|
370
|
+
this.form = formBuilder.group(formSettings);
|
|
371
|
+
}
|
|
372
|
+
getSiteId() {
|
|
373
|
+
if (this.site && this.site.id != null) {
|
|
374
|
+
return this.site.id;
|
|
375
|
+
}
|
|
376
|
+
if (this.hasMultipleSiteIds()) {
|
|
377
|
+
return this.multipleSitesId.split(',')[0];
|
|
378
|
+
}
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
hasMultipleSiteIds() {
|
|
382
|
+
return this.hasMultipleSites && !!this.multipleSitesId && this.multipleSitesId.length > 0;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
class LineAssociation {
|
|
387
|
+
constructor(lineAssociation, appValidators) {
|
|
388
|
+
this.sharedUsers = [];
|
|
389
|
+
this.sharedDevices = [];
|
|
390
|
+
this.active = false;
|
|
391
|
+
this.hasChanges = false;
|
|
392
|
+
Object.assign(this, lineAssociation || {});
|
|
393
|
+
if (lineAssociation) {
|
|
394
|
+
this.index = lineAssociation.index || null;
|
|
395
|
+
this.position = lineAssociation.position || null;
|
|
396
|
+
this.e164Mask = lineAssociation.e164Mask || '';
|
|
397
|
+
this.textLabel = lineAssociation.textLabel || '';
|
|
398
|
+
this.displayLabel = lineAssociation.displayLabel || '';
|
|
399
|
+
this.displayLabelAscii = lineAssociation.displayLabelAscii || '';
|
|
400
|
+
this.linePkid = lineAssociation.linePkid || lineAssociation.pkid || '';
|
|
401
|
+
this.maxNumberOfCalls = lineAssociation.maxNumberOfCalls || null;
|
|
402
|
+
this.busyTrigger = lineAssociation.busyTrigger || null;
|
|
403
|
+
this.directoryNumber = new LineDirectory(lineAssociation.directoryNumber);
|
|
404
|
+
this.didPattern = new TranslationPattern(lineAssociation.didPattern);
|
|
405
|
+
this.recordingOption = lineAssociation.recordingOption || RecordingOptions.disabled;
|
|
406
|
+
this.recordingProfile = lineAssociation.recordingProfile || '';
|
|
407
|
+
this.recordingMediaSource = lineAssociation.recordingMediaSource || RECORDING_MEDIA_SOURCE[0];
|
|
408
|
+
this.visualMWI = lineAssociation.visualMWI || '';
|
|
409
|
+
this.audibleMWI = lineAssociation.audibleMWI || '';
|
|
410
|
+
this.ringSetting_idle = lineAssociation.ringSetting_idle || '';
|
|
411
|
+
this.ringSetting_active = lineAssociation.ringSetting_active || '';
|
|
412
|
+
this.pickupAAS_idle = lineAssociation.pickupAAS_idle || '';
|
|
413
|
+
this.pickupAAS_active = lineAssociation.pickupAAS_active || '';
|
|
414
|
+
this.monitorCSS = lineAssociation.monitorCSS || '';
|
|
415
|
+
this.logMissedCall = lineAssociation.logMissedCall || true;
|
|
416
|
+
this.callInfoDisplay = new LineCallInfoDisplay(lineAssociation.callInfoDisplay);
|
|
417
|
+
this.lineLocalId = lineAssociation.lineLocalId || lineAssociation.localId || '';
|
|
418
|
+
this.callingSearchSpace = lineAssociation.callingSearchSpace || '';
|
|
419
|
+
this.ownerUserId = lineAssociation.ownerUserId;
|
|
420
|
+
this.associated = lineAssociation.associated;
|
|
421
|
+
this.alertingName = lineAssociation.alertingName;
|
|
422
|
+
this.description = lineAssociation.description;
|
|
423
|
+
this.patternUsage = lineAssociation.patternUsage;
|
|
424
|
+
this.plarDestinationNumber = lineAssociation.plarDestinationNumber;
|
|
425
|
+
this.prefixDigits = lineAssociation.prefixDigits;
|
|
426
|
+
this.plarDescription = lineAssociation.plarDescription;
|
|
427
|
+
this.plarEnabled = lineAssociation.plarEnabled;
|
|
428
|
+
this.populateWithDid = lineAssociation.populateWithDid;
|
|
429
|
+
}
|
|
430
|
+
this.initForm(appValidators);
|
|
431
|
+
}
|
|
432
|
+
getSavableData() {
|
|
433
|
+
const excludedFields = ['viewMode', 'form', 'callingSearchSpace', 'plarDestinationNumber', 'prefixDigits', 'plarDescription', 'plarEnabled', 'hasChanges', 'active'];
|
|
434
|
+
return getSavableData(this, excludedFields);
|
|
435
|
+
}
|
|
436
|
+
getFullData() {
|
|
437
|
+
return getSavableData(this, ['form', 'hasChanges', 'active']);
|
|
438
|
+
}
|
|
439
|
+
getDnSavableData() {
|
|
440
|
+
}
|
|
441
|
+
/*initForm() {
|
|
442
|
+
// TEMP simplified line form
|
|
443
|
+
const formBuilder = new FormBuilder();
|
|
444
|
+
const formSettings = {
|
|
445
|
+
directoryNumber: [this.directoryNumber.directoryNumber || ''],
|
|
446
|
+
textLabel: [this.textLabel || ''],
|
|
447
|
+
};
|
|
448
|
+
this.form = formBuilder.group(formSettings);
|
|
449
|
+
}*/
|
|
450
|
+
initForm(appValidators) {
|
|
451
|
+
const formBuilder = new FormBuilder();
|
|
452
|
+
const formSettings = {
|
|
453
|
+
displayLabel: [this.displayLabel || '', [Validators.maxLength(30), Validators.pattern('[^%&\\[{}|"<>\\]]*')]],
|
|
454
|
+
e164Mask: [this.e164Mask || '', [appValidators.e164MaskLabel]],
|
|
455
|
+
textLabel: [this.textLabel || '', [Validators.maxLength(30), Validators.pattern('[^"]*')]],
|
|
456
|
+
maxNumberOfCalls: [this.maxNumberOfCalls || '', [Validators.min(0)]],
|
|
457
|
+
busyTrigger: [this.busyTrigger || '', [Validators.min(0), Validators.max(this.maxNumberOfCalls || 200)]],
|
|
458
|
+
recordingOption: [this.recordingOption || ''],
|
|
459
|
+
recordingProfile: [this.recordingProfile || '', [appValidators.conditionalRequired('recordingOption', [RecordingOptions.auto_enabled, RecordingOptions.selective_enabled])]],
|
|
460
|
+
recordingMediaSource: [this.recordingMediaSource || ''],
|
|
461
|
+
visualMWI: [this.visualMWI || ''],
|
|
462
|
+
audibleMWI: [this.audibleMWI || ''],
|
|
463
|
+
ringSetting_idle: [this.ringSetting_idle || ''],
|
|
464
|
+
ringSetting_active: [this.ringSetting_active || ''],
|
|
465
|
+
pickupAAS_idle: [this.pickupAAS_idle || ''],
|
|
466
|
+
pickupAAS_active: [this.pickupAAS_active || ''],
|
|
467
|
+
monitorCSS: [this.monitorCSS || ''],
|
|
468
|
+
logMissedCall: [this.logMissedCall === 'true'],
|
|
469
|
+
callerName: [this.callInfoDisplay && this.callInfoDisplay.callerName === 'true'],
|
|
470
|
+
callerNumber: [this.callInfoDisplay && this.callInfoDisplay.callerNumber === 'true'],
|
|
471
|
+
redirectedNumber: [this.callInfoDisplay && this.callInfoDisplay.redirectedNumber === 'true'],
|
|
472
|
+
dialedNumber: [this.callInfoDisplay && this.callInfoDisplay.dialedNumber === 'true'],
|
|
473
|
+
// alertingName: [this.alertingName || ''],
|
|
474
|
+
// description: [this.description || ''],
|
|
475
|
+
// displayLabelAscii: [this.displayLabelAscii || '', [appValidators.displayLabelAscii]]
|
|
476
|
+
};
|
|
477
|
+
this.form = formBuilder.group(formSettings);
|
|
478
|
+
if (this.directoryNumber) {
|
|
479
|
+
this.form.addControl('directoryNumber', this.directoryNumber.form);
|
|
480
|
+
}
|
|
481
|
+
if (this.didPattern) {
|
|
482
|
+
this.form.addControl('didPattern', this.didPattern.form);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
equals(line) {
|
|
486
|
+
if (!line) {
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
return this.directoryNumber.directoryNumber === line.directoryNumber.directoryNumber &&
|
|
490
|
+
this.directoryNumber.routePartitionName === line.directoryNumber.routePartitionName;
|
|
491
|
+
}
|
|
492
|
+
fullEqual(line) {
|
|
493
|
+
if (!line) {
|
|
494
|
+
return false;
|
|
495
|
+
}
|
|
496
|
+
return JSON.stringify(this.getFullData()) === JSON.stringify(line.getFullData());
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
class Device {
|
|
501
|
+
constructor(device, validationService) {
|
|
502
|
+
this.lineAssociationsHasChanges = false;
|
|
503
|
+
this.plarService = false;
|
|
504
|
+
if (device) {
|
|
505
|
+
this.name = device.name;
|
|
506
|
+
this.pkiid = device.pkiid;
|
|
507
|
+
this.deviceType = device.deviceType;
|
|
508
|
+
this.protocol = device.protocol;
|
|
509
|
+
this.description = device.description;
|
|
510
|
+
this.buttonTemplate = device.buttonTemplate;
|
|
511
|
+
this.softkeyTemplate = device.softkeyTemplate;
|
|
512
|
+
this.devicePoolName = device.devicePoolName;
|
|
513
|
+
this.location = device.location;
|
|
514
|
+
this.firmwareVersion = device.firmwareVersion;
|
|
515
|
+
this.plarService = device.plarService;
|
|
516
|
+
this.callingSearchSpaceName = device.callingSearchSpaceName;
|
|
517
|
+
this.registrationStatus = 'Unknown'; // TEMP for demo
|
|
518
|
+
this.ipAddress = 'None'; // TEMP for demo
|
|
519
|
+
this.lineAssociations = device.lineAssociations?.length ?
|
|
520
|
+
device.lineAssociations.map((line) => new LineAssociation(line, validationService)) : [];
|
|
521
|
+
}
|
|
522
|
+
this.initForm();
|
|
523
|
+
}
|
|
524
|
+
initForm() {
|
|
525
|
+
const formBuilder = new FormBuilder();
|
|
526
|
+
const formSettings = {
|
|
527
|
+
ipAddress: [{ value: this.ipAddress || '', disabled: true }],
|
|
528
|
+
registrationStatus: [{ value: this.registrationStatus || '', disabled: true }],
|
|
529
|
+
description: [{ value: this.description || '', disabled: false }],
|
|
530
|
+
protocol: [{ value: this.protocol || '', disabled: true }],
|
|
531
|
+
softkeyTemplate: [{ value: this.softkeyTemplate || '', disabled: false }],
|
|
532
|
+
buttonTemplate: [{ value: this.buttonTemplate || '', disabled: true }],
|
|
533
|
+
location: [{ value: this.location || '', disabled: true }],
|
|
534
|
+
devicePoolName: [{ value: this.devicePoolName || '', disabled: false }],
|
|
535
|
+
callingSearchSpaceName: [{ value: this.callingSearchSpaceName || '', disabled: false }],
|
|
536
|
+
firmwareVersion: [{ value: this.firmwareVersion || '', disabled: true }],
|
|
537
|
+
plarService: [{ value: this.plarService || '', disabled: true }],
|
|
538
|
+
};
|
|
539
|
+
this.form = formBuilder.group(formSettings);
|
|
540
|
+
}
|
|
541
|
+
getSavableData() {
|
|
542
|
+
const excludedFields = ['form', 'ipAddress', 'registrationStatus', 'isCtiRoutePoint', 'deviceKind', 'alreadyUsedName', 'lineAssociationsHasChanges'];
|
|
543
|
+
return getSavableData(this, excludedFields);
|
|
544
|
+
}
|
|
545
|
+
getNoLinesFullData() {
|
|
546
|
+
const excludedFields = ['form', 'lineAssociations', 'lineAssociationsHasChanges'];
|
|
547
|
+
return getSavableData(this, excludedFields);
|
|
548
|
+
}
|
|
549
|
+
getDeviceInfoSavableData() {
|
|
550
|
+
const excludedFields = ['form', 'ipAddress', 'registrationStatus', 'lineAssociations', 'lineAssociationsHasChanges'];
|
|
551
|
+
return getSavableData(this, excludedFields);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
var RecordingOptions;
|
|
555
|
+
(function (RecordingOptions) {
|
|
556
|
+
RecordingOptions["disabled"] = "Call Recording Disabled";
|
|
557
|
+
RecordingOptions["auto_enabled"] = "Automatic Call Recording Enabled";
|
|
558
|
+
RecordingOptions["selective_enabled"] = "Selective Call Recording Enabled";
|
|
559
|
+
})(RecordingOptions || (RecordingOptions = {}));
|
|
560
|
+
class Buttontemplate {
|
|
561
|
+
constructor() { }
|
|
562
|
+
}
|
|
563
|
+
var DeviceViewType;
|
|
564
|
+
(function (DeviceViewType) {
|
|
565
|
+
DeviceViewType[DeviceViewType["INFO"] = 0] = "INFO";
|
|
566
|
+
DeviceViewType[DeviceViewType["LINES"] = 1] = "LINES";
|
|
567
|
+
DeviceViewType[DeviceViewType["DIALS"] = 2] = "DIALS";
|
|
568
|
+
DeviceViewType[DeviceViewType["BLF"] = 3] = "BLF";
|
|
569
|
+
})(DeviceViewType || (DeviceViewType = {}));
|
|
570
|
+
var DeviceKind;
|
|
571
|
+
(function (DeviceKind) {
|
|
572
|
+
DeviceKind["device"] = "devices";
|
|
573
|
+
DeviceKind["deviceProfile"] = "deviceProfiles";
|
|
574
|
+
})(DeviceKind || (DeviceKind = {}));
|
|
575
|
+
var DeviceTypes$1;
|
|
576
|
+
(function (DeviceTypes) {
|
|
577
|
+
DeviceTypes["CTI_ROUTE_POINT"] = "CTI Route Point";
|
|
578
|
+
DeviceTypes["CTI_PORT"] = "CTI Port";
|
|
579
|
+
DeviceTypes["CTI_REMOTE"] = "CTI Remote Device";
|
|
580
|
+
})(DeviceTypes$1 || (DeviceTypes$1 = {}));
|
|
581
|
+
|
|
582
|
+
class SimplifiedUser {
|
|
583
|
+
constructor(user, validationService) {
|
|
584
|
+
if (user) {
|
|
585
|
+
this.userid = user.userid;
|
|
586
|
+
this.email = user.email;
|
|
587
|
+
this.firstName = user.firstName;
|
|
588
|
+
this.lastName = user.lastName;
|
|
589
|
+
this.token = user.token;
|
|
590
|
+
this.siteId = user.siteId;
|
|
591
|
+
this.siteName = user.siteName;
|
|
592
|
+
this.department = user.department;
|
|
593
|
+
this.manager = user.manager;
|
|
594
|
+
this.associatedPc = user.associatedPc;
|
|
595
|
+
this.digestCredentials = user.digestCredentials;
|
|
596
|
+
this.userProfile = user.userProfile;
|
|
597
|
+
this.enableMobileVoiceAccess = user.enableMobileVoiceAccess;
|
|
598
|
+
this.userLocale = user.userLocale;
|
|
599
|
+
this.confirmDigestCredentials = user.confirmDigestCredentials;
|
|
600
|
+
this.middleName = user.middleName;
|
|
601
|
+
this.telephoneNumber = user.telephoneNumber;
|
|
602
|
+
this.mobileNumber = user.mobileNumber;
|
|
603
|
+
this.directoryUri = user.directoryUri;
|
|
604
|
+
this.title = user.title;
|
|
605
|
+
this.homeNumber = user.homeNumber;
|
|
606
|
+
this.pagerNumber = user.pagerNumber;
|
|
607
|
+
this.displayName = user.displayName;
|
|
608
|
+
if (user.devices?.length) {
|
|
609
|
+
this.devices = user.devices.map((device) => new Device(device, validationService));
|
|
610
|
+
if (user.lines?.length) {
|
|
611
|
+
this.devices.forEach(device => {
|
|
612
|
+
if (device?.lineAssociations?.length) {
|
|
613
|
+
device.lineAssociations.forEach(lineAssociation => {
|
|
614
|
+
lineAssociation.callingSearchSpace = this.getLineVal(lineAssociation, user.lines, 'callingSearchSpace');
|
|
615
|
+
lineAssociation.textLabel = lineAssociation.textLabel || this.getLineVal(lineAssociation, user.lines, 'textLabel') || '';
|
|
616
|
+
lineAssociation.alertingName = lineAssociation.alertingName || this.getLineVal(lineAssociation, user.lines, 'alertingName') || '';
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
this.initForm();
|
|
624
|
+
}
|
|
625
|
+
getLineVal(lineAssociation, lines, token) {
|
|
626
|
+
const lineForVal = lines.find((line) => line.directoryNumber.directoryNumber === lineAssociation.directoryNumber.directoryNumber);
|
|
627
|
+
return lineForVal && lineForVal[token] || '';
|
|
628
|
+
}
|
|
629
|
+
initForm() {
|
|
630
|
+
const formBuilder = new FormBuilder();
|
|
631
|
+
const formSettings = {
|
|
632
|
+
userid: [{ value: this.userid || '', disabled: false }, [Validators.required, Validators.maxLength(128)]],
|
|
633
|
+
email: [{ value: this.email || '', disabled: false }, [
|
|
634
|
+
Validators.pattern(REGEX_PATTERN.EMAIL),
|
|
635
|
+
Validators.required
|
|
636
|
+
]],
|
|
637
|
+
firstName: [{ value: this.firstName || '', disabled: false }],
|
|
638
|
+
lastName: [{ value: this.lastName || '', disabled: false }, Validators.required],
|
|
639
|
+
department: [{ value: this.department || '', disabled: false }],
|
|
640
|
+
middleName: [{ value: this.middleName || '', disabled: false }],
|
|
641
|
+
title: [{ value: this.title || '', disabled: false }],
|
|
642
|
+
telephoneNumber: [{ value: this.telephoneNumber || '', disabled: false }],
|
|
643
|
+
homeNumber: [{ value: this.homeNumber || '', disabled: false }],
|
|
644
|
+
mobileNumber: [{ value: this.mobileNumber || '', disabled: false }],
|
|
645
|
+
pagerNumber: [{ value: this.pagerNumber || '', disabled: false }],
|
|
646
|
+
displayName: [{ value: this.displayName || '', disabled: false }],
|
|
647
|
+
manager: [{ value: this.manager || '', disabled: false }],
|
|
648
|
+
associatedPc: [this.associatedPc || ''],
|
|
649
|
+
directoryUri: [this.directoryUri || ''],
|
|
650
|
+
userProfile: [this.userProfile],
|
|
651
|
+
enableMobileVoiceAccess: [this.enableMobileVoiceAccess],
|
|
652
|
+
userLocale: [this.userLocale || ''],
|
|
653
|
+
digestCredentials: [''],
|
|
654
|
+
confirmDigestCredentials: ['']
|
|
655
|
+
};
|
|
656
|
+
this.form = formBuilder.group(formSettings);
|
|
657
|
+
}
|
|
658
|
+
toggleEditMode() {
|
|
659
|
+
this.editMode = !this.editMode;
|
|
660
|
+
['userid', 'email', 'firstName', 'lastName'].forEach(token => {
|
|
661
|
+
if (this.editMode) {
|
|
662
|
+
this.form.get(token)?.enable();
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
this.form.get(token)?.disable();
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
getSavableData() {
|
|
670
|
+
const excludedFields = ['form', 'editMode', 'viewMode', 'token', 'hasModifiedCache', 'confirmDigestCredentials'];
|
|
671
|
+
return getSavableData(this, excludedFields);
|
|
672
|
+
}
|
|
673
|
+
getFullData() {
|
|
674
|
+
const excludedFields = ['form'];
|
|
675
|
+
return getSavableData(this, excludedFields);
|
|
676
|
+
}
|
|
677
|
+
getUserDetailsSavableData() {
|
|
678
|
+
const excludedFields = ['devices', 'deviceProfiles', 'lines', 'singleNumberReach', 'vmPassword', 'vmUnifiedMessagingAccount', 'alternateExtensions', 'callerInput', 'lineAppearances', 'meetMes', 'webAppPasswordSettings', 'form'];
|
|
679
|
+
return getSavableData(this, excludedFields);
|
|
680
|
+
}
|
|
681
|
+
equal(userToCompare) {
|
|
682
|
+
if (!userToCompare) {
|
|
683
|
+
return false;
|
|
684
|
+
}
|
|
685
|
+
return JSON.stringify(this.getSavableData()) === JSON.stringify(userToCompare.getSavableData());
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
class UtilsService {
|
|
690
|
+
static filterOptions(options, query, shownValue, field) {
|
|
691
|
+
if (!options) {
|
|
692
|
+
return [];
|
|
693
|
+
}
|
|
694
|
+
if (!query) {
|
|
695
|
+
return options;
|
|
696
|
+
}
|
|
697
|
+
return options.filter(option => {
|
|
698
|
+
return (field ? String(option[field]).toLowerCase().includes(String(query).toLowerCase()) :
|
|
699
|
+
String(option).toLowerCase().includes(String(query).toLowerCase()) ||
|
|
700
|
+
(shownValue && shownValue === option));
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
;
|
|
704
|
+
static sortSortArrayByProperty(array, sortBy) {
|
|
705
|
+
if (!array) {
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
return array.sort((a, b) => {
|
|
709
|
+
if (!a[sortBy] && !b[sortBy]) {
|
|
710
|
+
return 0;
|
|
711
|
+
}
|
|
712
|
+
if (a[sortBy] && !b[sortBy]) {
|
|
713
|
+
return 1;
|
|
714
|
+
}
|
|
715
|
+
if (!a[sortBy] && b[sortBy]) {
|
|
716
|
+
return -1;
|
|
717
|
+
}
|
|
718
|
+
const positionA = a[sortBy];
|
|
719
|
+
const positionB = b[sortBy];
|
|
720
|
+
return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
static diff(origObject, updatedObj, path, keysToIgnore) {
|
|
724
|
+
let result = [];
|
|
725
|
+
if (Object.is(origObject, updatedObj)) {
|
|
726
|
+
return undefined;
|
|
727
|
+
}
|
|
728
|
+
if (!updatedObj || typeof updatedObj !== 'object') {
|
|
729
|
+
return updatedObj;
|
|
730
|
+
}
|
|
731
|
+
const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
|
|
732
|
+
const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
|
|
733
|
+
filter
|
|
734
|
+
.forEach(key => {
|
|
735
|
+
if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
|
|
736
|
+
if (UtilsService.differs(updatedObj[key], origObject[key])) {
|
|
737
|
+
const newPath = `${path}${path ? '.' : ''}${key}`;
|
|
738
|
+
const values = UtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
|
|
739
|
+
if (values !== undefined) {
|
|
740
|
+
result = [...result, ...values];
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
|
|
745
|
+
const value = updatedObj ? UtilsService.formatIfEmpty(updatedObj[key]) : null;
|
|
746
|
+
result.push(`${path}${path ? '.' : ''}${key}=${value}`);
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
return result;
|
|
750
|
+
}
|
|
751
|
+
static formatIfEmpty(value) {
|
|
752
|
+
if (value) {
|
|
753
|
+
return value;
|
|
754
|
+
}
|
|
755
|
+
switch (typeof value) {
|
|
756
|
+
case 'boolean':
|
|
757
|
+
return value;
|
|
758
|
+
case 'string':
|
|
759
|
+
return '';
|
|
760
|
+
default:
|
|
761
|
+
return null;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
static differs(obj1, obj2) {
|
|
765
|
+
return JSON.stringify(obj1) !== JSON.stringify(obj2);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
UtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
769
|
+
UtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService });
|
|
770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UtilsService, decorators: [{
|
|
771
|
+
type: Injectable
|
|
772
|
+
}] });
|
|
773
|
+
|
|
774
|
+
const string_array = function (original, updated, fullKey) {
|
|
775
|
+
if (!updated || !SortingUtilsService.differs(original, updated)) {
|
|
776
|
+
return null;
|
|
777
|
+
}
|
|
778
|
+
return `${fullKey}=${updated.join(',')}`;
|
|
779
|
+
};
|
|
780
|
+
const line_reference = function (original, updated, fullKey) {
|
|
781
|
+
if (!updated || !SortingUtilsService.differs(original, updated)) {
|
|
782
|
+
return null;
|
|
783
|
+
}
|
|
784
|
+
// @ts-ignore
|
|
785
|
+
return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
|
|
786
|
+
};
|
|
787
|
+
const nullable = function (original, updated, fullKey) {
|
|
788
|
+
if (!original && updated) {
|
|
789
|
+
// @ts-ignore
|
|
790
|
+
return Object.keys(updated).map(key => `${fullKey}.${key}=${updated[key]}`);
|
|
791
|
+
}
|
|
792
|
+
else if (original && !updated) {
|
|
793
|
+
return `${fullKey}=null`;
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
return SortingUtilsService.diff(original, updated, fullKey, []);
|
|
797
|
+
}
|
|
798
|
+
};
|
|
799
|
+
class SortingUtilsService {
|
|
800
|
+
static sortDevicesByTypeAndName(array) {
|
|
801
|
+
if (!array) {
|
|
802
|
+
return null;
|
|
803
|
+
}
|
|
804
|
+
return array.sort((a, b) => {
|
|
805
|
+
if (a.deviceType === b.deviceType) {
|
|
806
|
+
return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0;
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
return (a.deviceType < b.deviceType) ? -1 : 1;
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
static sortLinesByDirectoryName(array) {
|
|
814
|
+
if (!array) {
|
|
815
|
+
return null;
|
|
816
|
+
}
|
|
817
|
+
return array.sort((a, b) => {
|
|
818
|
+
if (!a.directoryNumber && !b.directoryNumber) {
|
|
819
|
+
return 0;
|
|
820
|
+
}
|
|
821
|
+
if (a.directoryNumber && !b.directoryNumber) {
|
|
822
|
+
return 1;
|
|
823
|
+
}
|
|
824
|
+
if (!a.directoryNumber && b.directoryNumber) {
|
|
825
|
+
return -1;
|
|
826
|
+
}
|
|
827
|
+
const directoryNumberA = a.directoryNumber.directoryNumber;
|
|
828
|
+
const directoryNumberB = b.directoryNumber.directoryNumber;
|
|
829
|
+
return (directoryNumberA < directoryNumberB) ? -1 : (directoryNumberA > directoryNumberB) ? 1 : 0;
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
static sortLineAssociationsByPosition(array) {
|
|
833
|
+
if (!array) {
|
|
834
|
+
return null;
|
|
835
|
+
}
|
|
836
|
+
return array.sort((a, b) => {
|
|
837
|
+
if (!a.position && !b.position) {
|
|
838
|
+
return 0;
|
|
839
|
+
}
|
|
840
|
+
if (a.position && !b.position) {
|
|
841
|
+
return 1;
|
|
842
|
+
}
|
|
843
|
+
if (!a.position && b.position) {
|
|
844
|
+
return -1;
|
|
845
|
+
}
|
|
846
|
+
const positionA = a.position;
|
|
847
|
+
const positionB = b.position;
|
|
848
|
+
return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
static sortSortArrayByProperty(array, sortBy) {
|
|
852
|
+
if (!array) {
|
|
853
|
+
return null;
|
|
854
|
+
}
|
|
855
|
+
return array.sort((a, b) => {
|
|
856
|
+
if (!a[sortBy] && !b[sortBy]) {
|
|
857
|
+
return 0;
|
|
858
|
+
}
|
|
859
|
+
if (a[sortBy] && !b[sortBy]) {
|
|
860
|
+
return 1;
|
|
861
|
+
}
|
|
862
|
+
if (!a[sortBy] && b[sortBy]) {
|
|
863
|
+
return -1;
|
|
864
|
+
}
|
|
865
|
+
const positionA = a[sortBy];
|
|
866
|
+
const positionB = b[sortBy];
|
|
867
|
+
return (positionA < positionB) ? -1 : (positionA > positionB) ? 1 : 0;
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
static diff(origObject, updatedObj, path, keysToIgnore) {
|
|
871
|
+
let result = [];
|
|
872
|
+
if (Object.is(origObject, updatedObj)) {
|
|
873
|
+
return undefined;
|
|
874
|
+
}
|
|
875
|
+
if (!updatedObj || typeof updatedObj !== 'object') {
|
|
876
|
+
return updatedObj;
|
|
877
|
+
}
|
|
878
|
+
const concat = Array.from(new Set([...Object.keys(origObject || {}), ...Object.keys(updatedObj || {})]));
|
|
879
|
+
const filter = keysToIgnore ? concat.filter(key => !keysToIgnore.includes(key)) : concat;
|
|
880
|
+
filter
|
|
881
|
+
.forEach(key => {
|
|
882
|
+
// @ts-ignore
|
|
883
|
+
if (this.dictionary[key]) {
|
|
884
|
+
// @ts-ignore
|
|
885
|
+
const complexResult = this.dictionary[key](origObject[key], updatedObj[key], `${path}${path ? '.' : ''}${key}`);
|
|
886
|
+
if (complexResult) {
|
|
887
|
+
if (Array.isArray(complexResult)) {
|
|
888
|
+
result = [...result, ...complexResult];
|
|
889
|
+
}
|
|
890
|
+
else {
|
|
891
|
+
result.push(complexResult);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
else if (typeof updatedObj[key] === 'object' && typeof origObject[key] === 'object') {
|
|
896
|
+
if (SortingUtilsService.differs(updatedObj[key], origObject[key])) {
|
|
897
|
+
const newPath = `${path}${path ? '.' : ''}${key}`;
|
|
898
|
+
const values = SortingUtilsService.diff(origObject[key], updatedObj[key], newPath, keysToIgnore);
|
|
899
|
+
if (values !== undefined) {
|
|
900
|
+
result = [...result, ...values];
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
else if (updatedObj && !origObject || updatedObj[key] !== origObject[key] && !Object.is(origObject[key], updatedObj[key])) {
|
|
905
|
+
const value = updatedObj ? SortingUtilsService.formatIfEmpty(updatedObj[key]) : null;
|
|
906
|
+
result.push(`${path}${path ? '.' : ''}${key}=${value}`);
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
return result;
|
|
910
|
+
}
|
|
911
|
+
static formatIfEmpty(value) {
|
|
912
|
+
if (value) {
|
|
913
|
+
return value;
|
|
914
|
+
}
|
|
915
|
+
switch (typeof value) {
|
|
916
|
+
case 'boolean':
|
|
917
|
+
return value;
|
|
918
|
+
case 'string':
|
|
919
|
+
return '';
|
|
920
|
+
default:
|
|
921
|
+
return null;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
static differs(obj1, obj2) {
|
|
925
|
+
return JSON.stringify(obj1) !== JSON.stringify(obj2);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
SortingUtilsService.dictionary = {
|
|
929
|
+
features: string_array,
|
|
930
|
+
services: string_array,
|
|
931
|
+
directoryNumber: line_reference,
|
|
932
|
+
primaryLineReference: line_reference,
|
|
933
|
+
speedDials: function (original, updated, fullKey) {
|
|
934
|
+
if (!updated || !SortingUtilsService.differs(original, updated)) {
|
|
935
|
+
return null;
|
|
936
|
+
}
|
|
937
|
+
// todo only changes, identification
|
|
938
|
+
let map = [];
|
|
939
|
+
updated.map((speedDial) => {
|
|
940
|
+
const currentFullKey = `${fullKey}.${speedDial.index}`; // ${speedDial.type} CHECk ?
|
|
941
|
+
map = [...map, Object.keys(speedDial).map(key => `${currentFullKey}.${key}=${speedDial[key]}`)];
|
|
942
|
+
});
|
|
943
|
+
return map;
|
|
944
|
+
},
|
|
945
|
+
lineAssociations: function (original, updated, fullKey) {
|
|
946
|
+
if (!updated || !SortingUtilsService.differs(original, updated)) {
|
|
947
|
+
return null;
|
|
948
|
+
}
|
|
949
|
+
let map = [];
|
|
950
|
+
updated.map((lineAssociation) => {
|
|
951
|
+
const currentFullKey = `${fullKey}.${lineAssociation.linePkid ? lineAssociation.linePkid : lineAssociation.lineLocalId}`;
|
|
952
|
+
const originalLineAssociation = original.find(line => line.index === lineAssociation.index);
|
|
953
|
+
if (SortingUtilsService.differs(originalLineAssociation, lineAssociation)) {
|
|
954
|
+
const diff = SortingUtilsService.diff(originalLineAssociation, lineAssociation, currentFullKey, []);
|
|
955
|
+
map = [...map, ...diff];
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
return map;
|
|
959
|
+
},
|
|
960
|
+
enterpriseAltNum: nullable,
|
|
961
|
+
e164AltNum: nullable
|
|
962
|
+
};
|
|
963
|
+
SortingUtilsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
964
|
+
SortingUtilsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService });
|
|
965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SortingUtilsService, decorators: [{
|
|
966
|
+
type: Injectable
|
|
967
|
+
}] });
|
|
968
|
+
|
|
969
|
+
class LineService {
|
|
970
|
+
constructor(apiService) {
|
|
971
|
+
this.apiService = apiService;
|
|
972
|
+
this.onSaveLineAssociationEvent = new Subject();
|
|
973
|
+
}
|
|
974
|
+
generateLineAssociationFromLine(lineAssociation) {
|
|
975
|
+
return {
|
|
976
|
+
directoryNumber: lineAssociation ? this.generateLineDirectory(lineAssociation) : null,
|
|
977
|
+
didPattern: lineAssociation ? this.generateDidPatternForLineAssociation(lineAssociation) : null,
|
|
978
|
+
mappedDids: lineAssociation ? '' : 'null',
|
|
979
|
+
index: lineAssociation ? lineAssociation.index : null,
|
|
980
|
+
position: lineAssociation ? lineAssociation.position : null,
|
|
981
|
+
textLabel: lineAssociation ? lineAssociation.textLabel : null,
|
|
982
|
+
// displayLabel: lineAssociation ? lineAssociation.displayLabel : 'null',
|
|
983
|
+
alertingName: lineAssociation ? lineAssociation.alertingName : null,
|
|
984
|
+
callerNumber: lineAssociation ? '' : 'null'
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
hasUnsavedChanges() {
|
|
988
|
+
if (this.line && this.originLine) {
|
|
989
|
+
return JSON.stringify(this.line.getSavableData()) !== JSON.stringify(this.originLine.getSavableData());
|
|
990
|
+
}
|
|
991
|
+
return false;
|
|
992
|
+
}
|
|
993
|
+
generateLineDirectory(lineAssociation) {
|
|
994
|
+
return {
|
|
995
|
+
directoryNumber: lineAssociation.directoryNumber.directoryNumber,
|
|
996
|
+
routePartitionName: lineAssociation.directoryNumber.routePartitionName,
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
generateDidPatternForLineAssociation(lineAssociation) {
|
|
1000
|
+
return {
|
|
1001
|
+
calledPartyTransformationMask: lineAssociation.directoryNumber.directoryNumber
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
checkLineDeletion(line, siteId) {
|
|
1005
|
+
const params = {
|
|
1006
|
+
extension: line.directoryNumber.directoryNumber,
|
|
1007
|
+
routePartition: line.directoryNumber.routePartitionName,
|
|
1008
|
+
};
|
|
1009
|
+
return this.apiService.fetch(API.CHECK_DELETE_LINE.replace(':siteId', String(siteId)), params);
|
|
1010
|
+
// .pipe(this.handleError(true, true));
|
|
1011
|
+
}
|
|
1012
|
+
deleteLine(siteId, pkid, token) {
|
|
1013
|
+
return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
|
|
1014
|
+
// .pipe(this.handleError(true, false));
|
|
1015
|
+
}
|
|
1016
|
+
disassociateLine(siteId, linePkid, token, deviceName) {
|
|
1017
|
+
return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
|
|
1018
|
+
.replace(':linePkid', linePkid)
|
|
1019
|
+
.replace(':deviceName', deviceName)
|
|
1020
|
+
.replace(':token', encodeURIComponent(token)), {});
|
|
1021
|
+
// .pipe(this.handleError(true, false));
|
|
1022
|
+
}
|
|
1023
|
+
updateLineFields(siteId, pkid, token, alertingName) {
|
|
1024
|
+
const body = ['line.description=', `line.alertingName=${alertingName}`];
|
|
1025
|
+
return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
|
|
1026
|
+
// .pipe(this.handleError(true, false));
|
|
1027
|
+
}
|
|
1028
|
+
getLineAssociationBody(originLineAssociation, lineAssociation) {
|
|
1029
|
+
const body = SortingUtilsService.diff(originLineAssociation.getSavableData(), lineAssociation.getSavableData(), `device.lineAssociations.${lineAssociation.linePkid}`, null);
|
|
1030
|
+
return body;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
LineService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1034
|
+
LineService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService });
|
|
1035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LineService, decorators: [{
|
|
1036
|
+
type: Injectable
|
|
1037
|
+
}], ctorParameters: function () { return [{ type: APIService }]; } });
|
|
1038
|
+
|
|
1039
|
+
class UserService {
|
|
1040
|
+
get lineAssociation() {
|
|
1041
|
+
return this.user?.devices[0].lineAssociations[0];
|
|
1042
|
+
}
|
|
1043
|
+
get originLineAssociation() {
|
|
1044
|
+
return this.originUser?.devices[0].lineAssociations[0];
|
|
1045
|
+
}
|
|
1046
|
+
constructor(apiService, lineService) {
|
|
1047
|
+
this.apiService = apiService;
|
|
1048
|
+
this.lineService = lineService;
|
|
1049
|
+
this.siteId = -1;
|
|
1050
|
+
this.userId = '';
|
|
1051
|
+
this.userIdExistPending = false;
|
|
1052
|
+
this.hasExistedUserId = false;
|
|
1053
|
+
this.onUserLineSaved$ = new Subject();
|
|
1054
|
+
this.onFetchUserToken$ = new Subject();
|
|
1055
|
+
}
|
|
1056
|
+
ngOnInit() {
|
|
1057
|
+
console.log(this.siteId);
|
|
1058
|
+
}
|
|
1059
|
+
resetLineAssociation(deviceIndex, lineIndex, validationService) {
|
|
1060
|
+
const originLine = this.originUser?.devices[deviceIndex]?.lineAssociations[lineIndex];
|
|
1061
|
+
if (this.user?.devices[deviceIndex]?.lineAssociations[lineIndex] && originLine) {
|
|
1062
|
+
this.user.devices[deviceIndex].lineAssociations[lineIndex] = new LineAssociation(JSON.parse(JSON.stringify(originLine.getFullData())), validationService);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
resetDevice(currentDevice, validationService) {
|
|
1066
|
+
const originDevice = this.originUser.devices.find(device => device.name === currentDevice.name);
|
|
1067
|
+
const deviceInd = this.user.devices.findIndex(device => device.name === currentDevice.name);
|
|
1068
|
+
if (originDevice && deviceInd > -1) {
|
|
1069
|
+
const lineAssociations = this.user.devices[deviceInd].lineAssociations;
|
|
1070
|
+
this.user.devices[deviceInd] = new Device(JSON.parse(JSON.stringify(originDevice.getNoLinesFullData())), validationService);
|
|
1071
|
+
this.user.devices[deviceInd].lineAssociations = lineAssociations;
|
|
1072
|
+
console.log('device after reset = ', this.user.devices[deviceInd]);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
fetchUserToken(siteId, userId, validationService, isSetNewTokenOnly) {
|
|
1076
|
+
/*if (this.siteId === siteId && this.userId === userId && this.user) {
|
|
1077
|
+
return of(this.user);
|
|
1078
|
+
}*/
|
|
1079
|
+
this.siteId = siteId;
|
|
1080
|
+
this.userId = userId;
|
|
1081
|
+
return this.apiService.fetch(API.USER_TOKEN.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))))
|
|
1082
|
+
.pipe(map((result) => {
|
|
1083
|
+
const user = result && Object.values(result)[0];
|
|
1084
|
+
const userToken = result && Object.keys(result)[0];
|
|
1085
|
+
if (user) {
|
|
1086
|
+
if (!isSetNewTokenOnly) {
|
|
1087
|
+
this.setSimplifiedUser(user, validationService, userToken);
|
|
1088
|
+
}
|
|
1089
|
+
else {
|
|
1090
|
+
this.user.token = user.token;
|
|
1091
|
+
this.originUser.token = user.token;
|
|
1092
|
+
}
|
|
1093
|
+
this.onFetchUserToken$.next(true);
|
|
1094
|
+
}
|
|
1095
|
+
}));
|
|
1096
|
+
// .pipe(this.handleError(false, true));
|
|
1097
|
+
}
|
|
1098
|
+
updateUserFields(body) {
|
|
1099
|
+
if (!this.userId || !this.siteId || !this.user?.token) {
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
return this.apiService.post(API.UPDATE_USER_FIELDS.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), body);
|
|
1103
|
+
// .pipe(this.handleError(false, true));
|
|
1104
|
+
}
|
|
1105
|
+
fetchUserById(id) {
|
|
1106
|
+
this.userIdExistPending = true;
|
|
1107
|
+
return this.apiService.fetch(API.USER_BY_ID.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))))
|
|
1108
|
+
.pipe(map(result => {
|
|
1109
|
+
this.userIdExistPending = false;
|
|
1110
|
+
return result;
|
|
1111
|
+
}));
|
|
1112
|
+
}
|
|
1113
|
+
fetchLeanUserConversationById(id) {
|
|
1114
|
+
return this.apiService.fetch(API.LEAN_USER_CONVERSATION_START.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))));
|
|
1115
|
+
}
|
|
1116
|
+
fetchLeanUserDevicesConversationById(id) {
|
|
1117
|
+
return this.apiService.fetch(API.LEAN_USER_DEVICES_CONVERSATION_START.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))));
|
|
1118
|
+
}
|
|
1119
|
+
fetchLeanUserLinesConversationById(id, leanUserDevicesToken) {
|
|
1120
|
+
return this.apiService.fetch(API.LEAN_USER_LINES_CONVERSATION_START.replace(':siteId', String(this.siteId))
|
|
1121
|
+
.replace(':userId', encodeURIComponent(encodeURIComponent(id))).replace(':leanUserDevicesToken', leanUserDevicesToken));
|
|
1122
|
+
}
|
|
1123
|
+
fetchLeanUserSNRConversationById(id) {
|
|
1124
|
+
return this.apiService.fetch(API.LEAN_USER_SNR_CONVERSATION_START.replace(':siteId', String(this.siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(id))));
|
|
1125
|
+
}
|
|
1126
|
+
persistCacheChanges() {
|
|
1127
|
+
/*const params = {
|
|
1128
|
+
excludeDeviceExtraOptions: true
|
|
1129
|
+
};*/
|
|
1130
|
+
return this.processUserChangesToCache()
|
|
1131
|
+
.pipe(map((result) => {
|
|
1132
|
+
return this.apiService.post(API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token), {}, {})
|
|
1133
|
+
.subscribe(() => {
|
|
1134
|
+
});
|
|
1135
|
+
// .pipe(map((user) => {
|
|
1136
|
+
// // this.setUser(user, false, this.user.token);
|
|
1137
|
+
// this.user.hasModifiedCache = false;
|
|
1138
|
+
// }))
|
|
1139
|
+
// .pipe(this.handleError(true, true));
|
|
1140
|
+
}));
|
|
1141
|
+
}
|
|
1142
|
+
processUserChangesToCache() {
|
|
1143
|
+
const calls = [];
|
|
1144
|
+
const body = UtilsService.diff(this.originUser.getUserDetailsSavableData(), this.user.getUserDetailsSavableData(), 'user');
|
|
1145
|
+
if (body?.length) {
|
|
1146
|
+
calls.push(this.updateUserFields(body));
|
|
1147
|
+
}
|
|
1148
|
+
if (!calls?.length) {
|
|
1149
|
+
return of(this.user);
|
|
1150
|
+
}
|
|
1151
|
+
return forkJoin(calls)
|
|
1152
|
+
.pipe(map((responses) => {
|
|
1153
|
+
// ApiUserResponse
|
|
1154
|
+
this.handleSaveUserResponse(responses);
|
|
1155
|
+
}));
|
|
1156
|
+
// .pipe(this.handleError(false, true));
|
|
1157
|
+
}
|
|
1158
|
+
saveNewLine(validationService) {
|
|
1159
|
+
this.deleteLine(this.user.siteId, this.lineAssociation.linePkid, encodeURIComponent(this.user.token))
|
|
1160
|
+
.subscribe(() => {
|
|
1161
|
+
const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
|
|
1162
|
+
this.apiService.post(URL, {})
|
|
1163
|
+
.subscribe(() => {
|
|
1164
|
+
this.fetchUserToken(this.siteId, this.user.userid, validationService, true)
|
|
1165
|
+
.subscribe(() => {
|
|
1166
|
+
this.runNewLineCreation();
|
|
1167
|
+
});
|
|
1168
|
+
});
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
persistUserCache() {
|
|
1172
|
+
const URL = API.PERSIST_USER_CACHE.replace(':siteId', String(this.siteId)).replace(':token', this.user.token);
|
|
1173
|
+
return this.apiService.post(URL, {});
|
|
1174
|
+
}
|
|
1175
|
+
runNewLineCreation() {
|
|
1176
|
+
// CREATE NEW LINE
|
|
1177
|
+
const newLineBody = SortingUtilsService.diff(this.lineService.generateLineAssociationFromLine(null), this.lineService.generateLineAssociationFromLine(this.lineAssociation), 'device.lineAssociations', null);
|
|
1178
|
+
this.associateLineToUserDevice(this.user.siteId, this.user.devices[0].name, newLineBody, null, this.lineAssociation.callingSearchSpace).subscribe((response) => {
|
|
1179
|
+
if (response?.currentUpdatedUser) {
|
|
1180
|
+
const linePkId = response.currentUpdatedUser.devices[0]?.lineAssociations[0]?.linePkid || response.currentUpdatedUser.devices[0]?.lineAssociations[0]?.lineLocalId;
|
|
1181
|
+
forkJoin([
|
|
1182
|
+
this.updateLineFields(this.siteId, linePkId, this.user.token, this.lineAssociation.alertingName),
|
|
1183
|
+
this.updateDeviceFields(this.siteId, this.user.devices[0]?.name, this.user.token)
|
|
1184
|
+
]).subscribe((response) => {
|
|
1185
|
+
this.originUser.devices[0].lineAssociations[0].directoryNumber.directoryNumber = this.lineAssociation.directoryNumber.directoryNumber;
|
|
1186
|
+
this.onUserLineSaved$.next(true);
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
// -----
|
|
1191
|
+
}
|
|
1192
|
+
deleteLine(siteId, pkid, token) {
|
|
1193
|
+
return this.apiService.delete(API.DELETE_LINE.replace(':siteId', String(siteId)).replace(':pkid', pkid).replace(':token', encodeURIComponent(token)), {});
|
|
1194
|
+
// .pipe(this.handleError(true, false));
|
|
1195
|
+
}
|
|
1196
|
+
disassociateLine(siteId, linePkid, token, deviceName) {
|
|
1197
|
+
return this.apiService.delete(API.DISASSOCIATE_LINE.replace(':siteId', String(siteId))
|
|
1198
|
+
.replace(':linePkid', linePkid)
|
|
1199
|
+
.replace(':deviceName', deviceName)
|
|
1200
|
+
.replace(':token', encodeURIComponent(token)), {});
|
|
1201
|
+
// .pipe(this.handleError(true, false));
|
|
1202
|
+
}
|
|
1203
|
+
updateLineFields(siteId, pkid, token, alertingName) {
|
|
1204
|
+
const body = ['line.description=', `line.alertingName=${alertingName}`];
|
|
1205
|
+
return this.apiService.post(API.UPDATE_LINE_FIELDS.replace(':siteId', String(siteId)).replace(':pkid', encodeURIComponent(pkid)).replace(':token', encodeURIComponent(token)), body);
|
|
1206
|
+
// .pipe(this.handleError(true, false));
|
|
1207
|
+
}
|
|
1208
|
+
updateDeviceFields(siteId, deviceName, token) {
|
|
1209
|
+
const body = ['device.associatedDNs.0=null'];
|
|
1210
|
+
return this.apiService.post(API.UPDATE_DEVICE_FIELDS.replace(':siteId', String(siteId)).replace(':deviceName', deviceName).replace(':token', encodeURIComponent(token)), body);
|
|
1211
|
+
// .pipe(this.handleError(true, false));
|
|
1212
|
+
}
|
|
1213
|
+
checkDestinationNumber(siteId, directoryNumber, routePartitionName) {
|
|
1214
|
+
const params = {
|
|
1215
|
+
dntype: 'EXTENSION'
|
|
1216
|
+
};
|
|
1217
|
+
const body = {
|
|
1218
|
+
directoryNumber: directoryNumber,
|
|
1219
|
+
routePartitionName: routePartitionName
|
|
1220
|
+
};
|
|
1221
|
+
return this.apiService.post(API.CHECK_DESTINATION_NUMBER.replace(':siteId', siteId), body, params);
|
|
1222
|
+
}
|
|
1223
|
+
associateLineToUserDevice(siteId, deviceName, body, pkid, css) {
|
|
1224
|
+
let params = {};
|
|
1225
|
+
if (pkid) {
|
|
1226
|
+
params = { linePkid: pkid };
|
|
1227
|
+
}
|
|
1228
|
+
if (css) {
|
|
1229
|
+
// @ts-ignore
|
|
1230
|
+
params['css'] = css;
|
|
1231
|
+
}
|
|
1232
|
+
return this.apiService.post(API.ASSOCIATE_LINE.replace(':siteId', String(siteId)).replace(':deviceName', deviceName)
|
|
1233
|
+
.replace(':token', encodeURIComponent(this.user.token)), body, params);
|
|
1234
|
+
// .pipe(this.handleError(true, true));
|
|
1235
|
+
}
|
|
1236
|
+
hasUnsavedChanges() {
|
|
1237
|
+
if (this.user && this.originUser) {
|
|
1238
|
+
return !this.user.equal(this.originUser);
|
|
1239
|
+
}
|
|
1240
|
+
return false;
|
|
1241
|
+
}
|
|
1242
|
+
setSimplifiedUser(user, validationService, userToken) {
|
|
1243
|
+
this.user = new SimplifiedUser(user, validationService);
|
|
1244
|
+
const copiedUser = JSON.parse(JSON.stringify(user));
|
|
1245
|
+
this.originUser = new SimplifiedUser(copiedUser, validationService);
|
|
1246
|
+
if (!this.user.token && userToken) {
|
|
1247
|
+
this.user.token = userToken;
|
|
1248
|
+
this.originUser.token = userToken;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
handleSaveUserResponse(responses) {
|
|
1252
|
+
if (!responses?.length) {
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
for (let len = responses.length, i = len - 1; i >= 0; i--) {
|
|
1256
|
+
if (responses[i] && responses[i].currentUpdatedUser) {
|
|
1257
|
+
// this.setUser(responses[i].currentUpdatedUser, false, this.user.token);
|
|
1258
|
+
this.user.hasModifiedCache = true;
|
|
1259
|
+
return;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, deps: [{ token: APIService }, { token: LineService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1265
|
+
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService });
|
|
1266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserService, decorators: [{
|
|
1267
|
+
type: Injectable
|
|
1268
|
+
}], ctorParameters: function () { return [{ type: APIService }, { type: LineService }]; } });
|
|
1269
|
+
|
|
1270
|
+
class DeviceService {
|
|
1271
|
+
constructor(apiService) {
|
|
1272
|
+
this.apiService = apiService;
|
|
1273
|
+
this.dataPending = false;
|
|
1274
|
+
}
|
|
1275
|
+
hasUnsavedChanges(device, originDevice) {
|
|
1276
|
+
if (device?.lineAssociationsHasChanges) {
|
|
1277
|
+
return true;
|
|
1278
|
+
}
|
|
1279
|
+
if (device && originDevice) {
|
|
1280
|
+
return JSON.stringify(device.getSavableData()) !== JSON.stringify(originDevice.getSavableData());
|
|
1281
|
+
}
|
|
1282
|
+
return false;
|
|
1283
|
+
}
|
|
1284
|
+
hasDeviceInfoUnsavedChanges(device, originDevice) {
|
|
1285
|
+
if (device && originDevice) {
|
|
1286
|
+
return JSON.stringify(device.getDeviceInfoSavableData()) !== JSON.stringify(originDevice.getDeviceInfoSavableData());
|
|
1287
|
+
}
|
|
1288
|
+
return false;
|
|
1289
|
+
}
|
|
1290
|
+
getDataToUpdateDevice(device, originalDevice) {
|
|
1291
|
+
// --- to exclude newLines from update
|
|
1292
|
+
// const devToUpdate = new Device(device, this.validationService);
|
|
1293
|
+
// const originalDevToUpdate = new Device(originalDevice, this.validationService);
|
|
1294
|
+
// // @ts-ignore
|
|
1295
|
+
// devToUpdate.lineAssociations = devToUpdate.lineAssociations?.filter(line => line.linePkid);
|
|
1296
|
+
// // @ts-ignore
|
|
1297
|
+
// originalDevToUpdate.lineAssociations = originalDevToUpdate.lineAssociations?.filter(line => line.linePkid);
|
|
1298
|
+
const body = SortingUtilsService.diff(originalDevice.getDeviceInfoSavableData(), device.getDeviceInfoSavableData(), 'device', ['speedDials', 'busyLampFields']);
|
|
1299
|
+
return body;
|
|
1300
|
+
}
|
|
1301
|
+
fetchLeanUserDevicesConversationById(userId, siteId) {
|
|
1302
|
+
return this.apiService.fetch(API.LEAN_USER_DEVICES_CONVERSATION_START.replace(':siteId', String(siteId)).replace(':userId', encodeURIComponent(encodeURIComponent(userId))));
|
|
1303
|
+
}
|
|
1304
|
+
getSlotsByButtonTemplate(siteId, buttonTemplateName) {
|
|
1305
|
+
return this.apiService.fetch(API.LINE_SLOTS.replace(':siteId', String(siteId)), { name: buttonTemplateName }, true);
|
|
1306
|
+
// .pipe(this.handleError(true, true));
|
|
1307
|
+
}
|
|
1308
|
+
putDeviceFields(siteId, deviceName, token, body) {
|
|
1309
|
+
console.log('userToken = ', token);
|
|
1310
|
+
const URL = API.UPDATE_DEVICE_FIELDS
|
|
1311
|
+
.replace(':siteId', String(siteId))
|
|
1312
|
+
.replace(':deviceName', deviceName)
|
|
1313
|
+
.replace(':token', token);
|
|
1314
|
+
console.log('url = ', URL);
|
|
1315
|
+
return this.apiService.post(URL, body);
|
|
1316
|
+
// .pipe(this.handleError(true, true));
|
|
1317
|
+
}
|
|
1318
|
+
updateAvailableSlots(siteId, device) {
|
|
1319
|
+
if (!device) {
|
|
1320
|
+
throw throwError(() => new Error('test'));
|
|
1321
|
+
}
|
|
1322
|
+
if (!device.buttonTemplate) {
|
|
1323
|
+
throw throwError(() => new Error('test'));
|
|
1324
|
+
}
|
|
1325
|
+
if (device.buttonTemplate === '') {
|
|
1326
|
+
device.availableSlots = [];
|
|
1327
|
+
return of(device);
|
|
1328
|
+
}
|
|
1329
|
+
const existingPositions = device.lineAssociations.map((lineAssociation) => lineAssociation.position);
|
|
1330
|
+
return this.getSlotsByButtonTemplate(siteId, device.buttonTemplate)
|
|
1331
|
+
.pipe(map((buttonTemplate) => {
|
|
1332
|
+
this.lineSlotsList = buttonTemplate.lineSlots;
|
|
1333
|
+
device.availableSlots = this.lineSlotsList.filter((position) => !existingPositions.includes(position));
|
|
1334
|
+
this.availableLineSlotsList = device.availableSlots.slice();
|
|
1335
|
+
return device;
|
|
1336
|
+
}));
|
|
1337
|
+
// .pipe(this.handleError(true, true));
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
DeviceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1341
|
+
DeviceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceService });
|
|
1342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceService, decorators: [{
|
|
1343
|
+
type: Injectable
|
|
1344
|
+
}], ctorParameters: function () { return [{ type: APIService }]; } });
|
|
1345
|
+
|
|
1346
|
+
class AppLoaderComponent {
|
|
1347
|
+
constructor() {
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
AppLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1351
|
+
AppLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppLoaderComponent, selector: "app-loader", ngImport: i0, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"120\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"], dependencies: [{ kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppLoaderComponent, decorators: [{
|
|
1353
|
+
type: Component,
|
|
1354
|
+
args: [{ selector: 'app-loader', encapsulation: ViewEncapsulation.None, template: "<div class=\"overlay\">\r\n <mat-progress-spinner\r\n class=\"page-spinner\"\r\n mode=\"indeterminate\"\r\n [diameter]=\"120\"></mat-progress-spinner>\r\n</div>\r\n", styles: [".overlay{position:fixed;width:100%;height:100%;inset:0;background-color:#fff3;z-index:200}\n"] }]
|
|
1355
|
+
}], ctorParameters: function () { return []; } });
|
|
1356
|
+
|
|
1357
|
+
class AuthInterceptor {
|
|
1358
|
+
constructor() {
|
|
1359
|
+
}
|
|
1360
|
+
intercept(request, next) {
|
|
1361
|
+
request = request.clone({
|
|
1362
|
+
setHeaders: {
|
|
1363
|
+
// Authorization: basicAuthHeaderString
|
|
1364
|
+
},
|
|
1365
|
+
withCredentials: true
|
|
1366
|
+
});
|
|
1367
|
+
return next.handle(request).pipe(catchError(err => {
|
|
1368
|
+
if (err instanceof HttpErrorResponse) {
|
|
1369
|
+
if (err.status === 401) {
|
|
1370
|
+
if (window.history.length < 3) {
|
|
1371
|
+
err.error.message = '';
|
|
1372
|
+
}
|
|
1373
|
+
else {
|
|
1374
|
+
err.error.message = 'SESSION_INACTIVE';
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
return throwError(err);
|
|
1379
|
+
}));
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
AuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1383
|
+
AuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor });
|
|
1384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthInterceptor, decorators: [{
|
|
1385
|
+
type: Injectable
|
|
1386
|
+
}], ctorParameters: function () { return []; } });
|
|
1387
|
+
|
|
1388
|
+
class MaterialModule {
|
|
1389
|
+
}
|
|
1390
|
+
MaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1391
|
+
MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
|
|
1392
|
+
MatButtonModule,
|
|
1393
|
+
MatListModule,
|
|
1394
|
+
MatProgressSpinnerModule,
|
|
1395
|
+
MatExpansionModule,
|
|
1396
|
+
MatInputModule,
|
|
1397
|
+
MatInputModule,
|
|
1398
|
+
MatListModule,
|
|
1399
|
+
MatTreeModule,
|
|
1400
|
+
MatTreeModule,
|
|
1401
|
+
MatNativeDateModule,
|
|
1402
|
+
MatDatepickerModule,
|
|
1403
|
+
MatTooltipModule,
|
|
1404
|
+
MatAutocompleteModule,
|
|
1405
|
+
MatChipsModule,
|
|
1406
|
+
MatSidenavModule,
|
|
1407
|
+
MatFormFieldModule,
|
|
1408
|
+
MatStepperModule,
|
|
1409
|
+
MatTabsModule,
|
|
1410
|
+
MatCardModule,
|
|
1411
|
+
MatSelectModule,
|
|
1412
|
+
MatCheckboxModule,
|
|
1413
|
+
MatSlideToggleModule,
|
|
1414
|
+
MatTableModule,
|
|
1415
|
+
MatPaginatorModule,
|
|
1416
|
+
MatDialogModule], exports: [DragDropModule,
|
|
1417
|
+
MatButtonModule,
|
|
1418
|
+
MatListModule,
|
|
1419
|
+
MatProgressSpinnerModule,
|
|
1420
|
+
MatExpansionModule,
|
|
1421
|
+
MatInputModule,
|
|
1422
|
+
MatInputModule,
|
|
1423
|
+
MatListModule,
|
|
1424
|
+
MatTreeModule,
|
|
1425
|
+
MatTreeModule,
|
|
1426
|
+
MatNativeDateModule,
|
|
1427
|
+
MatDatepickerModule,
|
|
1428
|
+
MatTooltipModule,
|
|
1429
|
+
MatAutocompleteModule,
|
|
1430
|
+
MatChipsModule,
|
|
1431
|
+
MatSidenavModule,
|
|
1432
|
+
MatFormFieldModule,
|
|
1433
|
+
MatStepperModule,
|
|
1434
|
+
MatTabsModule,
|
|
1435
|
+
MatCardModule,
|
|
1436
|
+
MatCheckboxModule,
|
|
1437
|
+
MatSelectModule,
|
|
1438
|
+
MatSlideToggleModule,
|
|
1439
|
+
MatProgressSpinnerModule,
|
|
1440
|
+
MatTableModule,
|
|
1441
|
+
MatPaginatorModule] });
|
|
1442
|
+
MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, imports: [DragDropModule,
|
|
1443
|
+
MatButtonModule,
|
|
1444
|
+
MatListModule,
|
|
1445
|
+
MatProgressSpinnerModule,
|
|
1446
|
+
MatExpansionModule,
|
|
1447
|
+
MatInputModule,
|
|
1448
|
+
MatInputModule,
|
|
1449
|
+
MatListModule,
|
|
1450
|
+
MatTreeModule,
|
|
1451
|
+
MatTreeModule,
|
|
1452
|
+
MatNativeDateModule,
|
|
1453
|
+
MatDatepickerModule,
|
|
1454
|
+
MatTooltipModule,
|
|
1455
|
+
MatAutocompleteModule,
|
|
1456
|
+
MatChipsModule,
|
|
1457
|
+
MatSidenavModule,
|
|
1458
|
+
MatFormFieldModule,
|
|
1459
|
+
MatStepperModule,
|
|
1460
|
+
MatTabsModule,
|
|
1461
|
+
MatCardModule,
|
|
1462
|
+
MatSelectModule,
|
|
1463
|
+
MatCheckboxModule,
|
|
1464
|
+
MatSlideToggleModule,
|
|
1465
|
+
MatTableModule,
|
|
1466
|
+
MatPaginatorModule,
|
|
1467
|
+
MatDialogModule, DragDropModule,
|
|
1468
|
+
MatButtonModule,
|
|
1469
|
+
MatListModule,
|
|
1470
|
+
MatProgressSpinnerModule,
|
|
1471
|
+
MatExpansionModule,
|
|
1472
|
+
MatInputModule,
|
|
1473
|
+
MatInputModule,
|
|
1474
|
+
MatListModule,
|
|
1475
|
+
MatTreeModule,
|
|
1476
|
+
MatTreeModule,
|
|
1477
|
+
MatNativeDateModule,
|
|
1478
|
+
MatDatepickerModule,
|
|
1479
|
+
MatTooltipModule,
|
|
1480
|
+
MatAutocompleteModule,
|
|
1481
|
+
MatChipsModule,
|
|
1482
|
+
MatSidenavModule,
|
|
1483
|
+
MatFormFieldModule,
|
|
1484
|
+
MatStepperModule,
|
|
1485
|
+
MatTabsModule,
|
|
1486
|
+
MatCardModule,
|
|
1487
|
+
MatCheckboxModule,
|
|
1488
|
+
MatSelectModule,
|
|
1489
|
+
MatSlideToggleModule,
|
|
1490
|
+
MatProgressSpinnerModule,
|
|
1491
|
+
MatTableModule,
|
|
1492
|
+
MatPaginatorModule] });
|
|
1493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MaterialModule, decorators: [{
|
|
1494
|
+
type: NgModule,
|
|
1495
|
+
args: [{
|
|
1496
|
+
imports: [
|
|
1497
|
+
DragDropModule,
|
|
1498
|
+
MatButtonModule,
|
|
1499
|
+
MatListModule,
|
|
1500
|
+
MatProgressSpinnerModule,
|
|
1501
|
+
MatExpansionModule,
|
|
1502
|
+
MatInputModule,
|
|
1503
|
+
MatInputModule,
|
|
1504
|
+
MatListModule,
|
|
1505
|
+
MatTreeModule,
|
|
1506
|
+
MatTreeModule,
|
|
1507
|
+
MatNativeDateModule,
|
|
1508
|
+
MatDatepickerModule,
|
|
1509
|
+
MatTooltipModule,
|
|
1510
|
+
MatAutocompleteModule,
|
|
1511
|
+
MatChipsModule,
|
|
1512
|
+
MatSidenavModule,
|
|
1513
|
+
MatFormFieldModule,
|
|
1514
|
+
MatStepperModule,
|
|
1515
|
+
MatTabsModule,
|
|
1516
|
+
MatCardModule,
|
|
1517
|
+
MatSelectModule,
|
|
1518
|
+
MatCheckboxModule,
|
|
1519
|
+
MatSlideToggleModule,
|
|
1520
|
+
MatTableModule,
|
|
1521
|
+
MatPaginatorModule,
|
|
1522
|
+
MatDialogModule
|
|
1523
|
+
],
|
|
1524
|
+
exports: [
|
|
1525
|
+
DragDropModule,
|
|
1526
|
+
MatButtonModule,
|
|
1527
|
+
MatListModule,
|
|
1528
|
+
MatProgressSpinnerModule,
|
|
1529
|
+
MatExpansionModule,
|
|
1530
|
+
MatInputModule,
|
|
1531
|
+
MatInputModule,
|
|
1532
|
+
MatListModule,
|
|
1533
|
+
MatTreeModule,
|
|
1534
|
+
MatTreeModule,
|
|
1535
|
+
MatNativeDateModule,
|
|
1536
|
+
MatDatepickerModule,
|
|
1537
|
+
MatTooltipModule,
|
|
1538
|
+
MatAutocompleteModule,
|
|
1539
|
+
MatChipsModule,
|
|
1540
|
+
MatSidenavModule,
|
|
1541
|
+
MatFormFieldModule,
|
|
1542
|
+
MatStepperModule,
|
|
1543
|
+
MatTabsModule,
|
|
1544
|
+
MatCardModule,
|
|
1545
|
+
MatCheckboxModule,
|
|
1546
|
+
MatSelectModule,
|
|
1547
|
+
MatSlideToggleModule,
|
|
1548
|
+
MatProgressSpinnerModule,
|
|
1549
|
+
MatTableModule,
|
|
1550
|
+
MatPaginatorModule
|
|
1551
|
+
],
|
|
1552
|
+
}]
|
|
1553
|
+
}] });
|
|
1554
|
+
|
|
1555
|
+
const environment = {
|
|
1556
|
+
production: false,
|
|
1557
|
+
// apiUrl: 'http://localhost:4200',
|
|
1558
|
+
apiUrl: 'http://192.168.0.191:8080',
|
|
1559
|
+
notificationsLifetime: 30000,
|
|
1560
|
+
longNotificationsLifetime: 45000,
|
|
1561
|
+
cashCleanTimer: 900000,
|
|
1562
|
+
cashArrayLength: 10000,
|
|
1563
|
+
matomoUrl: 'http://192.168.0.136/matomo/',
|
|
1564
|
+
};
|
|
1565
|
+
|
|
1566
|
+
const TTL_DEFAULT = environment.notificationsLifetime;
|
|
1567
|
+
const TTL_LONG_DEFAULT = environment.longNotificationsLifetime;
|
|
1568
|
+
var NotificationType;
|
|
1569
|
+
(function (NotificationType) {
|
|
1570
|
+
NotificationType["info"] = "info";
|
|
1571
|
+
NotificationType["error"] = "error";
|
|
1572
|
+
NotificationType["success"] = "success";
|
|
1573
|
+
NotificationType["warning"] = "warning";
|
|
1574
|
+
})(NotificationType || (NotificationType = {}));
|
|
1575
|
+
class Notification {
|
|
1576
|
+
constructor(data) {
|
|
1577
|
+
this.ttl = TTL_DEFAULT;
|
|
1578
|
+
Object.assign(this, data || {});
|
|
1579
|
+
if (this.ttl === undefined) {
|
|
1580
|
+
this.ttl = this.message && this.message.length && this.message.length < 80 ? TTL_DEFAULT : TTL_LONG_DEFAULT;
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
isInfo() {
|
|
1584
|
+
return this.type === NotificationType.info;
|
|
1585
|
+
}
|
|
1586
|
+
isError() {
|
|
1587
|
+
return this.type === NotificationType.error;
|
|
1588
|
+
}
|
|
1589
|
+
isSuccess() {
|
|
1590
|
+
return this.type === NotificationType.success;
|
|
1591
|
+
}
|
|
1592
|
+
isWarning() {
|
|
1593
|
+
return this.type === NotificationType.warning;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
const SUCCESS_TIME = 5000;
|
|
1598
|
+
const INACTIVE_SESSION_MESSAGE = 'Your session was lost due to inactivity. Please login again';
|
|
1599
|
+
const INACTIVE_SESSION = 'SESSION_INACTIVE';
|
|
1600
|
+
class NotificationService {
|
|
1601
|
+
constructor() {
|
|
1602
|
+
this.listChange = new Subject();
|
|
1603
|
+
this.max = 0;
|
|
1604
|
+
this.list = [];
|
|
1605
|
+
}
|
|
1606
|
+
error(message, ttl) {
|
|
1607
|
+
this.notify('error', message, ttl);
|
|
1608
|
+
}
|
|
1609
|
+
success(message, ttl) {
|
|
1610
|
+
this.notify('success', message, (!ttl) ? SUCCESS_TIME : ttl);
|
|
1611
|
+
}
|
|
1612
|
+
warning(message, ttl) {
|
|
1613
|
+
this.notify('warning', message, ttl);
|
|
1614
|
+
}
|
|
1615
|
+
info(message, ttl) {
|
|
1616
|
+
this.notify('info', message, ttl);
|
|
1617
|
+
}
|
|
1618
|
+
notify(type, message, ttl) {
|
|
1619
|
+
const found = this.list.find((n) => n.message === message);
|
|
1620
|
+
if (found) {
|
|
1621
|
+
this.remove(found);
|
|
1622
|
+
}
|
|
1623
|
+
const notification = new Notification({
|
|
1624
|
+
id: ++this.max,
|
|
1625
|
+
type, message, ttl
|
|
1626
|
+
});
|
|
1627
|
+
if (notification.ttl > 0) {
|
|
1628
|
+
notification.timerId = setTimeout(() => this.remove(notification, true), notification.ttl);
|
|
1629
|
+
}
|
|
1630
|
+
this.list.push(notification);
|
|
1631
|
+
this.listChange.next(this.list);
|
|
1632
|
+
}
|
|
1633
|
+
remove(notification, auto) {
|
|
1634
|
+
if (!auto && notification.timerId) {
|
|
1635
|
+
// clear timeout in case of manual remove
|
|
1636
|
+
clearInterval(notification.timerId);
|
|
1637
|
+
}
|
|
1638
|
+
this.list = this.list.filter(n => n.id !== notification.id);
|
|
1639
|
+
this.listChange.next(this.list);
|
|
1640
|
+
}
|
|
1641
|
+
removeInactiveSessionError() {
|
|
1642
|
+
if (!this.list || !this.list.length) {
|
|
1643
|
+
return;
|
|
1644
|
+
}
|
|
1645
|
+
this.list = this.list.filter(n => n.message !== INACTIVE_SESSION_MESSAGE && n.message !== INACTIVE_SESSION);
|
|
1646
|
+
this.listChange.next(this.list);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1650
|
+
NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService });
|
|
1651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
|
|
1652
|
+
type: Injectable
|
|
1653
|
+
}], ctorParameters: function () { return []; } });
|
|
1654
|
+
|
|
1655
|
+
class NotificationsComponent {
|
|
1656
|
+
constructor(notificationService, ref) {
|
|
1657
|
+
this.notificationService = notificationService;
|
|
1658
|
+
this.ref = ref;
|
|
1659
|
+
}
|
|
1660
|
+
ngOnInit() {
|
|
1661
|
+
this.listChangeSubscribe();
|
|
1662
|
+
}
|
|
1663
|
+
ngOnDestroy() {
|
|
1664
|
+
this.listSubscription.unsubscribe();
|
|
1665
|
+
}
|
|
1666
|
+
readMore() {
|
|
1667
|
+
this.isReadMore = !this.isReadMore;
|
|
1668
|
+
}
|
|
1669
|
+
removeNotification(notification) {
|
|
1670
|
+
this.notificationService.remove(notification);
|
|
1671
|
+
}
|
|
1672
|
+
listChangeSubscribe() {
|
|
1673
|
+
this.listSubscription = this.notificationService.listChange
|
|
1674
|
+
.subscribe((list) => {
|
|
1675
|
+
this.list = list;
|
|
1676
|
+
this.ref.detectChanges();
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
NotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, deps: [{ token: NotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1681
|
+
NotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NotificationsComponent, selector: "app-notification", ngImport: i0, template: "<!--\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1682
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationsComponent, decorators: [{
|
|
1683
|
+
type: Component,
|
|
1684
|
+
args: [{ selector: 'app-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n\r\n<div class=\"notification-block\" role=\"alert\" aria-live=\"assertive\">\r\n <div class=\"notification\"\r\n *ngFor=\"let notification of list\"\r\n [ngClass]=\"{'error': notification.isError(), 'success': notification.isSuccess()}\">\r\n\r\n <div class=\"flex-box\">\r\n <div class=\"notification-icons-block\">\r\n <i *ngIf=\"notification.isError()\" class=\"fa fa-exclamation-triangle\"></i>\r\n <i *ngIf=\"notification.isWarning()\" class=\"fa fa-hand-paper-o\"></i>\r\n <i *ngIf=\"notification.isSuccess()\" class=\"fa fa-check\"></i>\r\n <i *ngIf=\"notification.isInfo()\" class=\"fa fa-info-circle\"></i>\r\n </div>\r\n <div *ngIf=\"!isReadMore\" class=\"message-block\">\r\n {{notification.message | truncate:[93]}}\r\n </div>\r\n <div *ngIf=\"isReadMore\" class=\"message-block\">\r\n {{notification.message}}\r\n </div>\r\n </div>\r\n <div class=\"read-more-error link clickable\" *ngIf=\"notification.message && notification.message.length > 93\"\r\n (click)=\"readMore()\">{{(isReadMore ? 'BUTTON.COLLAPSE' : 'BUTTON.READ_MORE') | translate}}</div>\r\n <button\r\n class=\"close\"\r\n mat-icon-button\r\n matTooltip=\"{{'BUTTON.CLOSE' | translate}} {{'NOTIFICATION_MSG.' + notification.type | translate}} {{'NOTIFICATION_MSG.NOTI' | translate}}\"\r\n (click)=\"removeNotification(notification)\">\r\n <img class=\"notification-icon-close\" src=\"assets/icons/close_icon_modal.svg\" alt=\"\">\r\n </button>\r\n </div>\r\n</div>\r\n-->\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.notification-block{right:0;top:110px;position:absolute;width:20%;z-index:100}.notification-block .read-more-error{margin:10px 13px 3px 0;text-align:right}.notification-block .notification{padding:15px 0 10px;margin-bottom:18px;color:#333;border-radius:3px;border-top:1.5px solid #e5e1cd;background:#fcf8e3;box-shadow:0 8px 12px #091e4226,0 0 1px #091e424f;width:368px;position:relative}.notification-block .notification .notification-icons-block{text-align:center;width:56px}.notification-block .notification .message-block{font-size:14px;font-family:Poppins,Poppins,sans-serif!important;word-break:break-word;width:270px}.notification-block .notification .notification-icon-close{height:24px}.notification-block .notification.error{background:#FFE9E9;border-top:1.5px solid #E16D6D}.notification-block .notification.success{background:#e3f4dc;border-top:1.5px solid #b3d692}.notification-block .notification .fa-exclamation-triangle{color:#e16d6d!important}.notification-block .notification .fa-check{color:#a0c37f!important}.notification-block .notification .fa-info-circle,.notification-block .notification .fa-hand-paper-o{color:#bdb89e!important}.notification-block .notification .fa{font-size:20px}.notification-block .notification .close{position:absolute;top:2px;right:-5px}.notification-block .notification .close .fa{font-size:14px}.notification-block .notification .fa{margin:0;color:inherit}@media screen and (max-width: 600px){.notification-block{width:50%;min-width:150px}}\n"] }]
|
|
1685
|
+
}], ctorParameters: function () { return [{ type: NotificationService }, { type: i0.ChangeDetectorRef }]; } });
|
|
1686
|
+
|
|
1687
|
+
class RemoveKynFromIBMService {
|
|
1688
|
+
constructor() {
|
|
1689
|
+
}
|
|
1690
|
+
removeCUCMS(date, customerId) {
|
|
1691
|
+
if (customerId === 8) {
|
|
1692
|
+
return date.filter((val) => !CUCMS_TO_IGNORE.includes(Math.round(val.cucmId)));
|
|
1693
|
+
}
|
|
1694
|
+
return date;
|
|
1695
|
+
}
|
|
1696
|
+
removeCUCS(date, customerId) {
|
|
1697
|
+
if (customerId === 8) {
|
|
1698
|
+
return date.filter((val) => !CUCS_TO_IGNORE.includes(Math.round(val.cucId)));
|
|
1699
|
+
}
|
|
1700
|
+
return date;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
RemoveKynFromIBMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1704
|
+
RemoveKynFromIBMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService });
|
|
1705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RemoveKynFromIBMService, decorators: [{
|
|
1706
|
+
type: Injectable
|
|
1707
|
+
}], ctorParameters: function () { return []; } });
|
|
1708
|
+
|
|
1709
|
+
class LazyLoadingSelectComponent {
|
|
1710
|
+
get formControl() {
|
|
1711
|
+
return this.form?.get(this.controlName);
|
|
1712
|
+
}
|
|
1713
|
+
constructor(notificationService, siteSettingsService) {
|
|
1714
|
+
this.notificationService = notificationService;
|
|
1715
|
+
this.siteSettingsService = siteSettingsService;
|
|
1716
|
+
this.standalone = true;
|
|
1717
|
+
this.appearance = 'standard';
|
|
1718
|
+
this.changeField = new EventEmitter();
|
|
1719
|
+
}
|
|
1720
|
+
ngAfterContentInit() {
|
|
1721
|
+
this.options = [this.form?.get(this.controlName)?.value];
|
|
1722
|
+
}
|
|
1723
|
+
getOptions() {
|
|
1724
|
+
if (!this.siteId && this.options.length > 1) {
|
|
1725
|
+
return;
|
|
1726
|
+
}
|
|
1727
|
+
this.optionsPending = true;
|
|
1728
|
+
this.siteSettingsService.getSelectionOptions(this.siteId, this.optionsToken)
|
|
1729
|
+
.subscribe(() => {
|
|
1730
|
+
this.optionsPending = false;
|
|
1731
|
+
// @ts-ignore
|
|
1732
|
+
this.options = this.siteSettingsService[this.optionsToken];
|
|
1733
|
+
}, () => {
|
|
1734
|
+
this.optionsPending = false;
|
|
1735
|
+
// this.notificationService.error(this.translate.instant('COMMON.LOAD_SELECT_OPTIONS_FAILED'));
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
onFieldChange(token) {
|
|
1739
|
+
this.changeField.emit(token);
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
LazyLoadingSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, deps: [{ token: NotificationService }, { token: SiteSettingsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1743
|
+
LazyLoadingSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: { siteId: "siteId", form: "form", standalone: "standalone", placeholder: "placeholder", controlName: "controlName", optionsToken: "optionsToken", appearance: "appearance", errorCode: "errorCode", errorText: "errorText", default: "default", id: "id" }, outputs: { changeField: "changeField" }, ngImport: i0, template: "<ng-container *ngIf=\"standalone\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\">\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n </mat-form-field>\r\n</ng-container>\r\n\r\n<!--\r\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\r\nWhich doesn't allow projection in mat-form-field\r\n-->\r\n\r\n<ng-container *ngIf=\"!standalone\">\r\n <mat-select *ngIf=\"form.get(controlName)\"\r\n [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\"\r\n >\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n</ng-container>\r\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
|
|
1744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LazyLoadingSelectComponent, decorators: [{
|
|
1745
|
+
type: Component,
|
|
1746
|
+
args: [{ selector: 'app-lazy-loading-select', template: "<ng-container *ngIf=\"standalone\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\">\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n </mat-form-field>\r\n</ng-container>\r\n\r\n<!--\r\nThis duplication is caused by the following bug: https://github.com/angular/components/issues/9411\r\nWhich doesn't allow projection in mat-form-field\r\n-->\r\n\r\n<ng-container *ngIf=\"!standalone\">\r\n <mat-select *ngIf=\"form.get(controlName)\"\r\n [formControl]=\"formControl\"\r\n (openedChange)=\"getOptions()\"\r\n [placeholder]=\"placeholder\"\r\n (selectionChange)=\"onFieldChange(controlName)\"\r\n [id]=\"id\"\r\n >\r\n <mat-option *ngIf=\"default\" [disabled]=\"default.disabled\" [value]=\"default.key\">{{default.value}}</mat-option>\r\n <mat-option *ngFor=\"let type of options\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n <mat-progress-spinner class=\"field-spinner\"\r\n [diameter]=\"20\"\r\n mode=\"indeterminate\"\r\n *ngIf=\"optionsPending\"></mat-progress-spinner>\r\n </mat-select>\r\n <mat-error *ngIf=\"form.get(controlName)?.hasError(errorCode)\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n {{errorText}}\r\n </mat-error>\r\n</ng-container>\r\n", styles: [".field-spinner{margin-top:-30px}mat-form-field{width:300px;max-width:300px}\n"] }]
|
|
1747
|
+
}], ctorParameters: function () { return [{ type: NotificationService }, { type: SiteSettingsService }]; }, propDecorators: { siteId: [{
|
|
1748
|
+
type: Input
|
|
1749
|
+
}], form: [{
|
|
1750
|
+
type: Input
|
|
1751
|
+
}], standalone: [{
|
|
1752
|
+
type: Input
|
|
1753
|
+
}], placeholder: [{
|
|
1754
|
+
type: Input
|
|
1755
|
+
}], controlName: [{
|
|
1756
|
+
type: Input
|
|
1757
|
+
}], optionsToken: [{
|
|
1758
|
+
type: Input
|
|
1759
|
+
}], appearance: [{
|
|
1760
|
+
type: Input
|
|
1761
|
+
}], errorCode: [{
|
|
1762
|
+
type: Input
|
|
1763
|
+
}], errorText: [{
|
|
1764
|
+
type: Input
|
|
1765
|
+
}], default: [{
|
|
1766
|
+
type: Input
|
|
1767
|
+
}], id: [{
|
|
1768
|
+
type: Input
|
|
1769
|
+
}], changeField: [{
|
|
1770
|
+
type: Output
|
|
1771
|
+
}] } });
|
|
1772
|
+
|
|
1773
|
+
var EntityChangeType;
|
|
1774
|
+
(function (EntityChangeType) {
|
|
1775
|
+
EntityChangeType["added"] = "added";
|
|
1776
|
+
EntityChangeType["updated"] = "updated";
|
|
1777
|
+
EntityChangeType["existing"] = "existing";
|
|
1778
|
+
EntityChangeType["removed"] = "removed";
|
|
1779
|
+
EntityChangeType["unassociated"] = "unassociated";
|
|
1780
|
+
})(EntityChangeType || (EntityChangeType = {}));
|
|
1781
|
+
var DnRangeType;
|
|
1782
|
+
(function (DnRangeType) {
|
|
1783
|
+
DnRangeType["extension"] = "EXTENSION";
|
|
1784
|
+
DnRangeType["cpg"] = "CPG";
|
|
1785
|
+
DnRangeType["callpark"] = "CALLPARK";
|
|
1786
|
+
DnRangeType["huntgroup"] = "HUNTGROUP";
|
|
1787
|
+
DnRangeType["meetme"] = "MEETME";
|
|
1788
|
+
DnRangeType["did"] = "DID";
|
|
1789
|
+
})(DnRangeType || (DnRangeType = {}));
|
|
1790
|
+
|
|
1791
|
+
class DnsService {
|
|
1792
|
+
constructor(apiService) {
|
|
1793
|
+
this.apiService = apiService;
|
|
1794
|
+
this.availableNumbers = {};
|
|
1795
|
+
}
|
|
1796
|
+
getNumberRange(siteId, routePartition, withdids, from, pageSize) {
|
|
1797
|
+
// @ts-ignore
|
|
1798
|
+
if (this.availableNumbers[routePartition]?.length) {
|
|
1799
|
+
return new Observable(observer => {
|
|
1800
|
+
// @ts-ignore
|
|
1801
|
+
observer.next(this.availableNumbers[routePartition]);
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1804
|
+
this.availableDidPatternsMappedToDn = {};
|
|
1805
|
+
pageSize = pageSize ? pageSize : 20;
|
|
1806
|
+
const params = { dntype: DnRangeType.extension, routepartition: routePartition, size: pageSize, page: 0 };
|
|
1807
|
+
if (withdids) {
|
|
1808
|
+
// @ts-ignore
|
|
1809
|
+
params['withdids'] = 'true';
|
|
1810
|
+
}
|
|
1811
|
+
if (from) {
|
|
1812
|
+
// @ts-ignore
|
|
1813
|
+
params['from'] = from;
|
|
1814
|
+
}
|
|
1815
|
+
// @ts-ignore
|
|
1816
|
+
this.availableNumbers[routePartition] = this.availableNumbers[routePartition] || [];
|
|
1817
|
+
return this.apiService.fetch(API.AVAILABLE_DN_IN_RANGES.replace(':siteId', siteId), params)
|
|
1818
|
+
.pipe(map((res) => {
|
|
1819
|
+
res.availableNumberList.forEach((availableNumber) => {
|
|
1820
|
+
this.setAvailableDidMappedToDn(availableNumber);
|
|
1821
|
+
// @ts-ignore
|
|
1822
|
+
this.availableNumbers[routePartition] = [...this.availableNumbers[routePartition], ...this.getUnwrapNumberRange(availableNumber)];
|
|
1823
|
+
});
|
|
1824
|
+
}));
|
|
1825
|
+
// .pipe(this.handleError(true, false));
|
|
1826
|
+
}
|
|
1827
|
+
setAvailableDidMappedToDn(availableNumber) {
|
|
1828
|
+
if (availableNumber.unUsedNumbersWithDids && availableNumber.unUsedNumbersWithDids.length) {
|
|
1829
|
+
availableNumber.unUsedNumbersWithDids.forEach((numberWithDids) => {
|
|
1830
|
+
const dn = numberWithDids['unUsedNumber'];
|
|
1831
|
+
this.availableDidPatternsMappedToDn[dn] = [{}];
|
|
1832
|
+
if (numberWithDids['translationPatternList'] && numberWithDids['translationPatternList'].length > 0) {
|
|
1833
|
+
this.availableDidPatternsMappedToDn[dn] = numberWithDids['translationPatternList'];
|
|
1834
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = [{}];
|
|
1835
|
+
if (numberWithDids['mappedDids'] && numberWithDids['mappedDids'].length > 0) {
|
|
1836
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] = numberWithDids['mappedDids'];
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
this.availableDidPatternsMappedToDn[dn][0]['vm'] = numberWithDids['vm'];
|
|
1840
|
+
});
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
getUnwrapNumberRange(availableNumber) {
|
|
1844
|
+
let unwrapNumberRange = this.unwrapNumberRange(availableNumber.phoneNumberRange.from, availableNumber.phoneNumberRange.to)
|
|
1845
|
+
.map((unwrappedNumber) => {
|
|
1846
|
+
const dn = availableNumber.phoneNumberRange.prefix + unwrappedNumber;
|
|
1847
|
+
let str = dn;
|
|
1848
|
+
if (this.availableDidPatternsMappedToDn[dn] && this.availableDidPatternsMappedToDn[dn].length > 0) {
|
|
1849
|
+
if (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'] && this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 0) {
|
|
1850
|
+
str += ' DID: ' + (this.availableDidPatternsMappedToDn[dn][0]['mappedDids'].length > 1 ? 'multiple' :
|
|
1851
|
+
this.availableDidPatternsMappedToDn[dn][0]['mappedDids'][0]);
|
|
1852
|
+
}
|
|
1853
|
+
if (this.availableDidPatternsMappedToDn[dn][0]['vm']) {
|
|
1854
|
+
str += ' In Use - VM';
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
return str;
|
|
1858
|
+
});
|
|
1859
|
+
unwrapNumberRange = unwrapNumberRange.filter((unwrappedNumber) => !availableNumber.usedNumbers.includes(unwrappedNumber));
|
|
1860
|
+
return unwrapNumberRange;
|
|
1861
|
+
}
|
|
1862
|
+
unwrapNumberRange(start, end) {
|
|
1863
|
+
const regExp = /(^0+)/;
|
|
1864
|
+
let leadingZeros = '';
|
|
1865
|
+
const matches = start.match(regExp);
|
|
1866
|
+
if (matches) {
|
|
1867
|
+
leadingZeros = matches[1];
|
|
1868
|
+
}
|
|
1869
|
+
const startNumeric = new Big(start);
|
|
1870
|
+
const endNumeric = new Big(end);
|
|
1871
|
+
// @ts-ignore
|
|
1872
|
+
return Array.from({ length: (endNumeric.minus(startNumeric).plus(new Big(1)).toFixed(0)) }, (v, k) => {
|
|
1873
|
+
const number = String(startNumeric.plus(new Big(k)).toFixed(0));
|
|
1874
|
+
if ((leadingZeros + number).length > start.length) {
|
|
1875
|
+
leadingZeros = leadingZeros.substr(1);
|
|
1876
|
+
}
|
|
1877
|
+
return leadingZeros + number;
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
DnsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, deps: [{ token: APIService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1882
|
+
DnsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService });
|
|
1883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DnsService, decorators: [{
|
|
1884
|
+
type: Injectable
|
|
1885
|
+
}], ctorParameters: function () { return [{ type: APIService }]; } });
|
|
1886
|
+
|
|
1887
|
+
class DeviceListComponent {
|
|
1888
|
+
constructor() {
|
|
1889
|
+
this.onDeviceSelect = new EventEmitter();
|
|
1890
|
+
console.log('devices list');
|
|
1891
|
+
}
|
|
1892
|
+
selectDevice(device) {
|
|
1893
|
+
this.onDeviceSelect.emit(device);
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
DeviceListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1897
|
+
DeviceListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceListComponent, selector: "app-device-list", inputs: { devices: "devices" }, outputs: { onDeviceSelect: "onDeviceSelect" }, ngImport: i0, template: "<div class=\"webex-list device-list-container\">\r\n <div class=\"webex-list-header\">\r\n <div class=\"webex-list-header__hr\">Name</div>\r\n <div class=\"webex-list-header__hr\">Type</div>\r\n <div class=\"webex-list-header__hr\">Line</div>\r\n <div class=\"webex-list-header__hr\">Device description</div>\r\n <div class=\"webex-list-header__hr\">Plar service</div>\r\n </div>\r\n <ng-container *ngFor=\"let device of devices\">\r\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\r\n <div class=\"device-item__td\">{{ device.name }}</div>\r\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\r\n <div class=\"device-item__td\">\r\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\r\n </div>\r\n <div class=\"device-item__td\">{{ device.description }}</div>\r\n <div class=\"device-item__td\">\r\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\r\n <div class=\"device-item__more\">\r\n<!-- <mat-icon>more_vert</mat-icon>-->\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }] });
|
|
1898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceListComponent, decorators: [{
|
|
1899
|
+
type: Component,
|
|
1900
|
+
args: [{ selector: 'app-device-list', template: "<div class=\"webex-list device-list-container\">\r\n <div class=\"webex-list-header\">\r\n <div class=\"webex-list-header__hr\">Name</div>\r\n <div class=\"webex-list-header__hr\">Type</div>\r\n <div class=\"webex-list-header__hr\">Line</div>\r\n <div class=\"webex-list-header__hr\">Device description</div>\r\n <div class=\"webex-list-header__hr\">Plar service</div>\r\n </div>\r\n <ng-container *ngFor=\"let device of devices\">\r\n <div class=\"device-item\" (click)=\"selectDevice(device)\">\r\n <div class=\"device-item__td\">{{ device.name }}</div>\r\n <div class=\"device-item__td\">{{ device.deviceType }}</div>\r\n <div class=\"device-item__td\">\r\n <span class=\"device-associated-line\" *ngFor=\"let line of device.lineAssociations\">{{line.directoryNumber?.directoryNumber}} | </span>\r\n </div>\r\n <div class=\"device-item__td\">{{ device.description }}</div>\r\n <div class=\"device-item__td\">\r\n <mat-slide-toggle class=\"device-slide-toggle\" [disabled]=\"true\" [checked]=\"device.plarService\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"device-item__actions-menu\" style=\"text-align: right;\">\r\n <div class=\"device-item__more\">\r\n<!-- <mat-icon>more_vert</mat-icon>-->\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: [".info-holder{display:flex;gap:16px;align-items:center;font-family:Inter,sans-serif;height:102px;width:100%;background:white;margin:0 0 30px}.info-holder__user-image img{width:40px;border-radius:120px;margin:20px 0 0}.info-holder__user-information{padding:10px;margin:10px;gap:10px;display:flex;flex-direction:column}.info-holder__user-name{font-size:20px;font-weight:500}.info-holder__user-breadcrumbs{display:flex;gap:8px;font-weight:400;font-size:14px;color:#000000b3;align-items:center}.info-holder .icon-separator{height:5px;width:5px;background-color:#000000b3;border-radius:50%}.info-holder .is-active{display:flex;gap:8px;align-items:center}.icon-user-status{width:.5rem;height:.5rem;border-radius:50%;background-color:#707070;margin:0 5px 0 0}.icon-user-status.icon-user-status-active{background-color:#1d805f;display:inline-block}.webex-list{padding:2.5rem}.webex-list-header{display:flex;align-items:center;padding:1rem}.webex-list-header__hr{width:100%;font-size:12px}.device-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-bottom:1px solid #b0b0b0;padding:.8rem;z-index:10;transition:background-color .3s;cursor:pointer}.device-item__td{width:100%}.device-item__actions-menu{position:absolute;margin:0 1rem;right:0}.device-item__more{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#b0b0b0;border-radius:50%;padding:.5rem;transition:background-color .3s ease-in-out}\n"] }]
|
|
1901
|
+
}], ctorParameters: function () { return []; }, propDecorators: { devices: [{
|
|
1902
|
+
type: Input
|
|
1903
|
+
}], onDeviceSelect: [{
|
|
1904
|
+
type: Output
|
|
1905
|
+
}] } });
|
|
1906
|
+
|
|
1907
|
+
class InfoDialogComponent {
|
|
1908
|
+
constructor(dialogRef, data) {
|
|
1909
|
+
this.dialogRef = dialogRef;
|
|
1910
|
+
this.data = data;
|
|
1911
|
+
this.confirmButtonText = 'OK';
|
|
1912
|
+
this.message = '';
|
|
1913
|
+
this.title = '';
|
|
1914
|
+
}
|
|
1915
|
+
ngOnInit() {
|
|
1916
|
+
this.confirmButtonText = this.data.confirmButtonText || '';
|
|
1917
|
+
this.message = this.data.message || '';
|
|
1918
|
+
this.title = this.data.title || '';
|
|
1919
|
+
}
|
|
1920
|
+
onClose(val) {
|
|
1921
|
+
this.dialogRef.close(val);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
InfoDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InfoDialogComponent, deps: [{ token: i1$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1925
|
+
InfoDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: InfoDialogComponent, selector: "app-info-dialog", ngImport: i0, template: "<div id=\"info-dialog\" class=\"app-dialog\" aria-labelledby=\"info-dialog-label\" role=\"dialog\">\r\n <h3 *ngIf=\"title\" class=\"app-dialog-title\">{{title}}</h3>\r\n <div mat-dialog-content *ngIf=\"message\" class=\"app-dialog-content\">\r\n <div [innerHTML]=\"message\"></div>\r\n </div>\r\n <div mat-dialog-actions class=\"flex-gap-container\">\r\n <button class=\"app-dialog-button app-dialog-cancel-button\" (click)=\"onClose(false)\">\r\n Cancel\r\n </button>\r\n <button class=\"app-dialog-button app-dialog-confirm-button\" (click)=\"onClose(true)\">\r\n {{confirmButtonText}}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";#info-dialog{min-height:150px;width:400px;box-sizing:border-box;position:relative}#info-dialog .fa{font-size:35px;margin:0 auto 20px;display:block;text-align:center;color:#009fdb;cursor:default}.scroll-content{overflow-y:auto;margin:auto;max-height:150px;width:100%}.app-dialog{font-family:Inter,Inter,sans-serif}.app-dialog .app-dialog-title{text-align:center;font-weight:600;font-size:16px;font-family:Inter,Inter,sans-serif;margin:0 0 24px}.app-dialog .flex-gap-container{gap:16px;position:absolute;right:0;bottom:0;gap:15px;display:flex}.app-dialog .app-dialog-content{color:#000000b3;font-size:14px}.app-dialog-button{height:32px;padding:10px 12px;text-align:center;border-radius:50px;box-shadow:none;line-height:11px;border:none;font-size:14px;font-family:Inter,Inter,sans-serif;cursor:pointer}.app-dialog-cancel-button{border:1px solid rgba(0,0,0,.5);color:#000;background:white}.app-dialog-confirm-button{background:black;color:#fff}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InfoDialogComponent, decorators: [{
|
|
1927
|
+
type: Component,
|
|
1928
|
+
args: [{ selector: 'app-info-dialog', encapsulation: ViewEncapsulation.None, template: "<div id=\"info-dialog\" class=\"app-dialog\" aria-labelledby=\"info-dialog-label\" role=\"dialog\">\r\n <h3 *ngIf=\"title\" class=\"app-dialog-title\">{{title}}</h3>\r\n <div mat-dialog-content *ngIf=\"message\" class=\"app-dialog-content\">\r\n <div [innerHTML]=\"message\"></div>\r\n </div>\r\n <div mat-dialog-actions class=\"flex-gap-container\">\r\n <button class=\"app-dialog-button app-dialog-cancel-button\" (click)=\"onClose(false)\">\r\n Cancel\r\n </button>\r\n <button class=\"app-dialog-button app-dialog-confirm-button\" (click)=\"onClose(true)\">\r\n {{confirmButtonText}}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap\";#info-dialog{min-height:150px;width:400px;box-sizing:border-box;position:relative}#info-dialog .fa{font-size:35px;margin:0 auto 20px;display:block;text-align:center;color:#009fdb;cursor:default}.scroll-content{overflow-y:auto;margin:auto;max-height:150px;width:100%}.app-dialog{font-family:Inter,Inter,sans-serif}.app-dialog .app-dialog-title{text-align:center;font-weight:600;font-size:16px;font-family:Inter,Inter,sans-serif;margin:0 0 24px}.app-dialog .flex-gap-container{gap:16px;position:absolute;right:0;bottom:0;gap:15px;display:flex}.app-dialog .app-dialog-content{color:#000000b3;font-size:14px}.app-dialog-button{height:32px;padding:10px 12px;text-align:center;border-radius:50px;box-shadow:none;line-height:11px;border:none;font-size:14px;font-family:Inter,Inter,sans-serif;cursor:pointer}.app-dialog-cancel-button{border:1px solid rgba(0,0,0,.5);color:#000;background:white}.app-dialog-confirm-button{background:black;color:#fff}\n"] }]
|
|
1929
|
+
}], ctorParameters: function () { return [{ type: i1$1.MatDialogRef }, { type: InfoDialogConfig, decorators: [{
|
|
1930
|
+
type: Inject,
|
|
1931
|
+
args: [MAT_DIALOG_DATA]
|
|
1932
|
+
}] }]; } });
|
|
1933
|
+
class InfoDialogConfig {
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
var SpeedDialType;
|
|
1937
|
+
(function (SpeedDialType) {
|
|
1938
|
+
SpeedDialType["slotBasic"] = "slotBasic";
|
|
1939
|
+
SpeedDialType["abbreviated"] = "abbreviated";
|
|
1940
|
+
})(SpeedDialType || (SpeedDialType = {}));
|
|
1941
|
+
var MailboxQuotasType;
|
|
1942
|
+
(function (MailboxQuotasType) {
|
|
1943
|
+
MailboxQuotasType["system"] = "system";
|
|
1944
|
+
MailboxQuotasType["custom"] = "custom";
|
|
1945
|
+
})(MailboxQuotasType || (MailboxQuotasType = {}));
|
|
1946
|
+
var VMNotificationsTypes;
|
|
1947
|
+
(function (VMNotificationsTypes) {
|
|
1948
|
+
VMNotificationsTypes["Pager Device"] = "Pager Device";
|
|
1949
|
+
VMNotificationsTypes["Phone Device"] = "Phone Device";
|
|
1950
|
+
VMNotificationsTypes["SMTP Device"] = "SMTP Device";
|
|
1951
|
+
VMNotificationsTypes["HTML Device"] = "HTML Device";
|
|
1952
|
+
})(VMNotificationsTypes || (VMNotificationsTypes = {}));
|
|
1953
|
+
var DeviceTypes;
|
|
1954
|
+
(function (DeviceTypes) {
|
|
1955
|
+
DeviceTypes["CTI_ROUTE_POINT"] = "CTI Route Point";
|
|
1956
|
+
DeviceTypes["CTI_PORT"] = "CTI Port";
|
|
1957
|
+
DeviceTypes["CTI_REMOTE"] = "CTI Remote Device";
|
|
1958
|
+
})(DeviceTypes || (DeviceTypes = {}));
|
|
1959
|
+
|
|
1960
|
+
const speedDialRegex = new RegExp('^[^"]*$');
|
|
1961
|
+
const BLFRegex = new RegExp('^[^"><&%]*$');
|
|
1962
|
+
const timeRegex = new RegExp('^([0-1][0-9]|[2][0-3]):([0-5][0-9])$');
|
|
1963
|
+
class ValidationService {
|
|
1964
|
+
constructor(siteSettingsService) {
|
|
1965
|
+
this.siteSettingsService = siteSettingsService;
|
|
1966
|
+
this.matchControl = (fieldName) => {
|
|
1967
|
+
return (control) => {
|
|
1968
|
+
if (!control?.parent) {
|
|
1969
|
+
return null;
|
|
1970
|
+
}
|
|
1971
|
+
const matchingControl = control.parent.get(fieldName);
|
|
1972
|
+
if (matchingControl.value && matchingControl.value !== control.value) {
|
|
1973
|
+
return {
|
|
1974
|
+
matchControl: true
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
return null;
|
|
1978
|
+
};
|
|
1979
|
+
};
|
|
1980
|
+
this.matchLength = (fieldName) => {
|
|
1981
|
+
return (control) => {
|
|
1982
|
+
if (!control.parent || !control.value) {
|
|
1983
|
+
return null;
|
|
1984
|
+
}
|
|
1985
|
+
const matchingControl = control.parent.get(fieldName);
|
|
1986
|
+
if (((!control.value.startsWith('+') && !matchingControl.value.startsWith('+')) ||
|
|
1987
|
+
(control.value.startsWith('+') && matchingControl.value.startsWith('+'))) &&
|
|
1988
|
+
((!control.value.startsWith('\\+') && !matchingControl.value.startsWith('\\+')) ||
|
|
1989
|
+
(control.value.startsWith('\\+') && matchingControl.value.startsWith('\\+'))) &&
|
|
1990
|
+
matchingControl.value.length !== control.value.length) {
|
|
1991
|
+
return {
|
|
1992
|
+
matchLength: true
|
|
1993
|
+
};
|
|
1994
|
+
}
|
|
1995
|
+
return null;
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
this.dynamicMaxLength = (length1, length2) => {
|
|
1999
|
+
return (control) => {
|
|
2000
|
+
if (!control.parent || !control.value) {
|
|
2001
|
+
return null;
|
|
2002
|
+
}
|
|
2003
|
+
const maxLength = String(control.value).includes('[') ? length1 : length2;
|
|
2004
|
+
if (control.value.length > maxLength) {
|
|
2005
|
+
return {
|
|
2006
|
+
maxLength: true
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
return null;
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
this.biggerThan = (fieldName) => {
|
|
2013
|
+
return (control) => {
|
|
2014
|
+
if (!control.parent || !control.value) {
|
|
2015
|
+
return null;
|
|
2016
|
+
}
|
|
2017
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2018
|
+
if (matchingControl.value.length === control.value.length && matchingControl.value && matchingControl.value > control.value) {
|
|
2019
|
+
return {
|
|
2020
|
+
biggerThan: true
|
|
2021
|
+
};
|
|
2022
|
+
}
|
|
2023
|
+
return null;
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
this.requiredByType = (fieldName, type) => {
|
|
2027
|
+
return (control) => {
|
|
2028
|
+
if (fieldName === 'phoneSystem' && (type === VMNotificationsTypes['Phone Device'] || type === VMNotificationsTypes['Pager Device']) ||
|
|
2029
|
+
fieldName === 'htmlTemplate' && type === VMNotificationsTypes['HTML Device']) {
|
|
2030
|
+
return {
|
|
2031
|
+
required: true
|
|
2032
|
+
};
|
|
2033
|
+
}
|
|
2034
|
+
return null;
|
|
2035
|
+
};
|
|
2036
|
+
};
|
|
2037
|
+
this.smallerThanQuota = (fieldName, quotaType, secondQuotaType) => {
|
|
2038
|
+
return (control) => {
|
|
2039
|
+
if (!control.parent) {
|
|
2040
|
+
return null;
|
|
2041
|
+
}
|
|
2042
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2043
|
+
const quotaTypeControl = control.parent.get(quotaType);
|
|
2044
|
+
const secondQuotaTypeControl = control.parent.get(secondQuotaType);
|
|
2045
|
+
if (quotaTypeControl && secondQuotaTypeControl && secondQuotaTypeControl.value === MailboxQuotasType.system) {
|
|
2046
|
+
return null;
|
|
2047
|
+
}
|
|
2048
|
+
if (quotaTypeControl && quotaTypeControl.value === MailboxQuotasType.system || matchingControl && matchingControl.value && parseInt(matchingControl.value) < parseInt(control.value)) {
|
|
2049
|
+
return {
|
|
2050
|
+
smallerThan: true
|
|
2051
|
+
};
|
|
2052
|
+
}
|
|
2053
|
+
return null;
|
|
2054
|
+
};
|
|
2055
|
+
};
|
|
2056
|
+
this.biggerThanQuota = (fieldName, quotaType) => {
|
|
2057
|
+
return (control) => {
|
|
2058
|
+
if (!control?.parent) {
|
|
2059
|
+
return null;
|
|
2060
|
+
}
|
|
2061
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2062
|
+
const quotaTypeControl = control.parent.get(quotaType);
|
|
2063
|
+
if (quotaTypeControl && quotaTypeControl.value === MailboxQuotasType.custom && matchingControl.value && parseInt(matchingControl.value) > parseInt(control.value)) {
|
|
2064
|
+
return {
|
|
2065
|
+
biggerThan: true
|
|
2066
|
+
};
|
|
2067
|
+
}
|
|
2068
|
+
return null;
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
this.rangeLimit = (fieldName) => {
|
|
2072
|
+
return (control) => {
|
|
2073
|
+
if (!control?.parent || !control.value) {
|
|
2074
|
+
return null;
|
|
2075
|
+
}
|
|
2076
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2077
|
+
if ((control.value - matchingControl.value) > 50000) {
|
|
2078
|
+
return {
|
|
2079
|
+
rangeLimit: true
|
|
2080
|
+
};
|
|
2081
|
+
}
|
|
2082
|
+
return null;
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2085
|
+
this.comparepatternParts = (fieldName) => {
|
|
2086
|
+
return (control) => {
|
|
2087
|
+
if (!control?.value) {
|
|
2088
|
+
return null;
|
|
2089
|
+
}
|
|
2090
|
+
const matches = control.value.match(/\[(.*?)\]/);
|
|
2091
|
+
if (matches) {
|
|
2092
|
+
const submatch = matches[1];
|
|
2093
|
+
const submatchsplit = submatch.split('-');
|
|
2094
|
+
for (let i = 0; i < submatchsplit.length; i++) {
|
|
2095
|
+
if (submatchsplit[i] >= submatchsplit[i + 1]) {
|
|
2096
|
+
return {
|
|
2097
|
+
comparepatternParts: true
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
return null;
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
this.matchPrefix = (fieldName) => {
|
|
2106
|
+
return (control) => {
|
|
2107
|
+
if (!control?.parent || !control.value) {
|
|
2108
|
+
return null;
|
|
2109
|
+
}
|
|
2110
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2111
|
+
if ((matchingControl.value.startsWith('+') || control.value.startsWith('+') || matchingControl.value.startsWith('\\+') || control.value.startsWith('\\+')) && (control.value.charAt(0) !== matchingControl.value.charAt(0))) {
|
|
2112
|
+
return {
|
|
2113
|
+
matchPrefix: true
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
return null;
|
|
2117
|
+
};
|
|
2118
|
+
};
|
|
2119
|
+
this.deviceNameValidator = (device) => {
|
|
2120
|
+
return (control) => {
|
|
2121
|
+
if (!control.value || device.deviceKind === DeviceKind.deviceProfile) {
|
|
2122
|
+
return;
|
|
2123
|
+
}
|
|
2124
|
+
if (device.isCtiRoutePoint) {
|
|
2125
|
+
let err = '';
|
|
2126
|
+
if (!control.value.match(/^[a-zA-Z0-9-_.]+$/)) {
|
|
2127
|
+
err = 'pattern';
|
|
2128
|
+
}
|
|
2129
|
+
if (control.value.trim().length > 15) {
|
|
2130
|
+
err = 'maxLength';
|
|
2131
|
+
}
|
|
2132
|
+
return err ? { nameRule: err } : null;
|
|
2133
|
+
}
|
|
2134
|
+
if (device.deviceDefaults && !device.isCtiRoutePoint) {
|
|
2135
|
+
const ruleText = device.deviceDefaults.deviceNameRegex;
|
|
2136
|
+
const rule = new RegExp(ruleText, 'g');
|
|
2137
|
+
const caption = device.deviceDefaults?.deviceNameExplained;
|
|
2138
|
+
const match = (control.value || '').match(rule) || [];
|
|
2139
|
+
const exactMatch = match && control.value === match[0];
|
|
2140
|
+
if (rule && !exactMatch) {
|
|
2141
|
+
return { nameRule: { caption } };
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
return null;
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2147
|
+
this.deviceNameValueValidator = (device, deviceName) => {
|
|
2148
|
+
return (control) => {
|
|
2149
|
+
if (!control.value || device.deviceKind === DeviceKind.deviceProfile) {
|
|
2150
|
+
return;
|
|
2151
|
+
}
|
|
2152
|
+
if (device.name && device.alreadyUsedName && device.name === device.alreadyUsedName) {
|
|
2153
|
+
return { nameRule: 'alreadyUsedName' };
|
|
2154
|
+
}
|
|
2155
|
+
if (device.isCtiRoutePoint) {
|
|
2156
|
+
let err = '';
|
|
2157
|
+
if (!deviceName.match(/^[a-zA-Z0-9-_.]+$/)) {
|
|
2158
|
+
err = 'pattern';
|
|
2159
|
+
}
|
|
2160
|
+
if (deviceName.trim().length > 15) {
|
|
2161
|
+
err = 'maxLength';
|
|
2162
|
+
}
|
|
2163
|
+
return err ? { nameRule: err } : null;
|
|
2164
|
+
}
|
|
2165
|
+
if (device.deviceDefaults && !device.isCtiRoutePoint) {
|
|
2166
|
+
const ruleText = device.deviceDefaults.deviceNameRegex;
|
|
2167
|
+
// console.log('Dev name rule - ', ruleText);
|
|
2168
|
+
const rule = new RegExp(ruleText, 'g');
|
|
2169
|
+
let caption = device.deviceDefaults.deviceNameExplained;
|
|
2170
|
+
if (!caption) {
|
|
2171
|
+
caption = ruleText;
|
|
2172
|
+
}
|
|
2173
|
+
const match = (deviceName || '').match(rule) || [];
|
|
2174
|
+
const exactMatch = match && deviceName === match[0];
|
|
2175
|
+
if (rule && !exactMatch) {
|
|
2176
|
+
return { nameRule: { caption } };
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
return null;
|
|
2180
|
+
};
|
|
2181
|
+
};
|
|
2182
|
+
this.deviceDuplicatingNameValidator = (user, pkid, prefix) => {
|
|
2183
|
+
return (control) => {
|
|
2184
|
+
if (!control.value || !user || !user.devices || user.devices.length === 0) {
|
|
2185
|
+
return;
|
|
2186
|
+
}
|
|
2187
|
+
const deviceName = prefix ? `${prefix}${control.value}` : control.value;
|
|
2188
|
+
const devicesWithTheSameName = user.devices.filter((device) => device.name === deviceName);
|
|
2189
|
+
if (devicesWithTheSameName.length > 0) {
|
|
2190
|
+
if (!pkid) { // For new device
|
|
2191
|
+
return { duplicateNameRule: true };
|
|
2192
|
+
}
|
|
2193
|
+
else if (pkid !== devicesWithTheSameName[0].pkid) { // For updating device, avoid validating with itself
|
|
2194
|
+
return { duplicateNameRule: true };
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
return null;
|
|
2198
|
+
};
|
|
2199
|
+
};
|
|
2200
|
+
this.conditionalRequired = (fieldName, requiredConditionValues) => {
|
|
2201
|
+
return (control) => {
|
|
2202
|
+
const parent1 = control.parent;
|
|
2203
|
+
if (!parent1 || !parent1.get(fieldName) || !parent1.get(fieldName).value) {
|
|
2204
|
+
return;
|
|
2205
|
+
}
|
|
2206
|
+
if (requiredConditionValues.includes(parent1.get(fieldName).value) && !control.value) {
|
|
2207
|
+
return {
|
|
2208
|
+
required: true
|
|
2209
|
+
};
|
|
2210
|
+
}
|
|
2211
|
+
return null;
|
|
2212
|
+
};
|
|
2213
|
+
};
|
|
2214
|
+
this.conditionalRequiredForGroupAdmin = (fieldName, requiredConditionValues) => {
|
|
2215
|
+
return (control) => {
|
|
2216
|
+
const parent1 = control.parent;
|
|
2217
|
+
if (!parent1 || !parent1.get(fieldName) || !parent1.get(fieldName).value || !parent1.get(fieldName).value.type) {
|
|
2218
|
+
return;
|
|
2219
|
+
}
|
|
2220
|
+
if (requiredConditionValues.includes(parent1.get(fieldName).value.type) && !control.value) {
|
|
2221
|
+
return {
|
|
2222
|
+
required: true
|
|
2223
|
+
};
|
|
2224
|
+
}
|
|
2225
|
+
return null;
|
|
2226
|
+
};
|
|
2227
|
+
};
|
|
2228
|
+
this.conditionalSiteGroupCheckForGroupAdmin = (fieldName, requiredConditionValues) => {
|
|
2229
|
+
return (control) => {
|
|
2230
|
+
const parent1 = control.parent;
|
|
2231
|
+
if (!parent1 || !parent1.get(fieldName) || !parent1.get(fieldName).value || !parent1.get(fieldName).value.type) {
|
|
2232
|
+
return;
|
|
2233
|
+
}
|
|
2234
|
+
if (parent1.get(fieldName).value && requiredConditionValues.includes(parent1.get(fieldName).value.type) &&
|
|
2235
|
+
parent1.get('siteGroup') && parent1.get('siteGroup').value &&
|
|
2236
|
+
parent1.get('siteGroup').value.siteGroupMembers && parent1.get('siteGroup').value.siteGroupMembers.length < 1) {
|
|
2237
|
+
return {
|
|
2238
|
+
hasSiteGroupError: true
|
|
2239
|
+
};
|
|
2240
|
+
}
|
|
2241
|
+
return null;
|
|
2242
|
+
};
|
|
2243
|
+
};
|
|
2244
|
+
this.requiredIfFieldIsEmptyForBLF = (fieldName) => {
|
|
2245
|
+
const DATE_PATTERN = '^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d$';
|
|
2246
|
+
return (control) => {
|
|
2247
|
+
const parent = control.parent;
|
|
2248
|
+
if (!parent || !parent.get(fieldName)) {
|
|
2249
|
+
return null;
|
|
2250
|
+
}
|
|
2251
|
+
if (!parent.get(fieldName).value && !control.value) {
|
|
2252
|
+
return {
|
|
2253
|
+
requiredEither: true,
|
|
2254
|
+
requiredBLFDN: true
|
|
2255
|
+
};
|
|
2256
|
+
}
|
|
2257
|
+
return null;
|
|
2258
|
+
};
|
|
2259
|
+
};
|
|
2260
|
+
this.validDate = (fieldName) => {
|
|
2261
|
+
return (control) => {
|
|
2262
|
+
const parent = control.parent;
|
|
2263
|
+
const ruleText = '^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d$';
|
|
2264
|
+
const rule = new RegExp(ruleText, 'g');
|
|
2265
|
+
const val = control.value && control.value.getDate();
|
|
2266
|
+
if (rule && !rule.test(val)) {
|
|
2267
|
+
return { pattern: true };
|
|
2268
|
+
}
|
|
2269
|
+
return null;
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
this.matchOption = (optionType, list, isFullList) => {
|
|
2273
|
+
return (control) => {
|
|
2274
|
+
if (!control.value || control.value === DeviceTypes.CTI_ROUTE_POINT) {
|
|
2275
|
+
return null;
|
|
2276
|
+
}
|
|
2277
|
+
let optionList = list || this.getOptionsList(optionType);
|
|
2278
|
+
if (optionList && optionList.length) {
|
|
2279
|
+
if (!isFullList && optionType === 'directoryNumbers') {
|
|
2280
|
+
optionList = optionList.map((str) => str.indexOf(' ') > -1 ? str.substring(0, str.indexOf(' ')) : str);
|
|
2281
|
+
}
|
|
2282
|
+
if (!optionList.includes(control.value)) {
|
|
2283
|
+
return {
|
|
2284
|
+
matchOptions: true
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
return null;
|
|
2289
|
+
};
|
|
2290
|
+
};
|
|
2291
|
+
this.confidentialAccessLevel = (confidentialAccessMode) => {
|
|
2292
|
+
return (control) => {
|
|
2293
|
+
if (!control.value && !confidentialAccessMode) {
|
|
2294
|
+
return null;
|
|
2295
|
+
}
|
|
2296
|
+
if (!control.value) {
|
|
2297
|
+
return {
|
|
2298
|
+
required: true
|
|
2299
|
+
};
|
|
2300
|
+
}
|
|
2301
|
+
return null;
|
|
2302
|
+
};
|
|
2303
|
+
};
|
|
2304
|
+
this.noResultDN = (optionType, list) => {
|
|
2305
|
+
return (control) => {
|
|
2306
|
+
if (!control.value || list === null) {
|
|
2307
|
+
return null;
|
|
2308
|
+
}
|
|
2309
|
+
if (list && list.length === 0) {
|
|
2310
|
+
return {
|
|
2311
|
+
noResultDNs: true
|
|
2312
|
+
};
|
|
2313
|
+
}
|
|
2314
|
+
return null;
|
|
2315
|
+
};
|
|
2316
|
+
};
|
|
2317
|
+
this.matchExtensionOption = (optionType, optionList) => {
|
|
2318
|
+
return (control) => {
|
|
2319
|
+
if (!control.value) {
|
|
2320
|
+
return control.value;
|
|
2321
|
+
}
|
|
2322
|
+
// @ts-ignore
|
|
2323
|
+
const newList = [];
|
|
2324
|
+
if (optionList && optionList.length) {
|
|
2325
|
+
optionList.forEach((list) => {
|
|
2326
|
+
const newOptionList = this.getMatchExistingVmLineValue(list);
|
|
2327
|
+
newList.push(newOptionList);
|
|
2328
|
+
});
|
|
2329
|
+
// @ts-ignore
|
|
2330
|
+
if (newList && !newList.includes(control.value)) {
|
|
2331
|
+
return {
|
|
2332
|
+
matchOptions: true
|
|
2333
|
+
};
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
else if (!optionList || !optionList.length) {
|
|
2337
|
+
return {
|
|
2338
|
+
matchOptions: true
|
|
2339
|
+
};
|
|
2340
|
+
}
|
|
2341
|
+
return null;
|
|
2342
|
+
};
|
|
2343
|
+
};
|
|
2344
|
+
this.requiredEitherForVmExtension = (fieldName1, fieldName2) => {
|
|
2345
|
+
return (control) => {
|
|
2346
|
+
if (!control.parent) {
|
|
2347
|
+
return null;
|
|
2348
|
+
}
|
|
2349
|
+
const matchControl1 = control.parent.get(fieldName1).value;
|
|
2350
|
+
const matchControl2 = control.parent.get(fieldName2).value;
|
|
2351
|
+
if (!matchControl1 && !matchControl2) {
|
|
2352
|
+
return {
|
|
2353
|
+
requiredEitherForVmExtension: true
|
|
2354
|
+
};
|
|
2355
|
+
}
|
|
2356
|
+
return null;
|
|
2357
|
+
};
|
|
2358
|
+
};
|
|
2359
|
+
this.requiredEitherOne = (fieldName1, fieldName2) => {
|
|
2360
|
+
return (control) => {
|
|
2361
|
+
if (!control.parent) {
|
|
2362
|
+
return null;
|
|
2363
|
+
}
|
|
2364
|
+
const matchControl1 = control.parent.get(fieldName1) && control.parent.get(fieldName1).value;
|
|
2365
|
+
const matchControl2 = control.parent.get(fieldName2) && control.parent.get(fieldName2).value;
|
|
2366
|
+
if (!matchControl1 && !matchControl2) {
|
|
2367
|
+
return {
|
|
2368
|
+
requiredEitherOne: true
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
return null;
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
this.requiredByValue = (fieldName, requestedFieldVal) => {
|
|
2375
|
+
return (control) => {
|
|
2376
|
+
if (!control || !control.parent) {
|
|
2377
|
+
return null;
|
|
2378
|
+
}
|
|
2379
|
+
const fieldVal = control.parent.get(fieldName) && control.parent.get(fieldName).value;
|
|
2380
|
+
if (fieldVal && fieldVal === requestedFieldVal && !control.value) {
|
|
2381
|
+
return {
|
|
2382
|
+
required: true
|
|
2383
|
+
};
|
|
2384
|
+
}
|
|
2385
|
+
return null;
|
|
2386
|
+
};
|
|
2387
|
+
};
|
|
2388
|
+
this.OneExtensionEmpty = (fieldName1, fieldName2) => {
|
|
2389
|
+
return (control) => {
|
|
2390
|
+
if (!control.parent) {
|
|
2391
|
+
return null;
|
|
2392
|
+
}
|
|
2393
|
+
const matchControl1 = control.parent.get(fieldName1).value;
|
|
2394
|
+
const matchControl2 = control.parent.get(fieldName2).value;
|
|
2395
|
+
if (matchControl1 && matchControl2) {
|
|
2396
|
+
return {
|
|
2397
|
+
OneExtensionIsEmpty: true
|
|
2398
|
+
};
|
|
2399
|
+
}
|
|
2400
|
+
return null;
|
|
2401
|
+
};
|
|
2402
|
+
};
|
|
2403
|
+
this.requiredByCondition = (requiredBy, fieldName) => {
|
|
2404
|
+
return (control) => {
|
|
2405
|
+
if (!control.parent) {
|
|
2406
|
+
return null;
|
|
2407
|
+
}
|
|
2408
|
+
const requiredByControl = control.parent.get(requiredBy).value;
|
|
2409
|
+
const requiredControl = control.parent.get(fieldName).value;
|
|
2410
|
+
if (requiredByControl && !requiredControl) {
|
|
2411
|
+
return {
|
|
2412
|
+
required: true
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
return null;
|
|
2416
|
+
};
|
|
2417
|
+
};
|
|
2418
|
+
this.pinMultiCharacterCheck = (fieldName) => {
|
|
2419
|
+
// @ts-ignore
|
|
2420
|
+
return (control) => {
|
|
2421
|
+
if (!control.parent) {
|
|
2422
|
+
return null;
|
|
2423
|
+
}
|
|
2424
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2425
|
+
const ruleMultiCharacter = new RegExp('([0-9])\\1{2}');
|
|
2426
|
+
if (matchingControl.value) {
|
|
2427
|
+
const hasMultiCharacter = ruleMultiCharacter.test(matchingControl.value);
|
|
2428
|
+
if (hasMultiCharacter) {
|
|
2429
|
+
return {
|
|
2430
|
+
multiCharacter: true
|
|
2431
|
+
};
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
};
|
|
2435
|
+
};
|
|
2436
|
+
this.pinConsecutiveNumberCheck = (fieldName) => {
|
|
2437
|
+
// @ts-ignore
|
|
2438
|
+
return (control) => {
|
|
2439
|
+
if (!control.parent) {
|
|
2440
|
+
return null;
|
|
2441
|
+
}
|
|
2442
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2443
|
+
const strToCheck = matchingControl.value;
|
|
2444
|
+
if (strToCheck && strToCheck.length > 1) {
|
|
2445
|
+
const resAsc = this.pinOrderCheck(strToCheck);
|
|
2446
|
+
if (resAsc === true) {
|
|
2447
|
+
return {
|
|
2448
|
+
consecutiveNumbers: true
|
|
2449
|
+
};
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
};
|
|
2453
|
+
};
|
|
2454
|
+
this.pinMailboxExtensionCheck = (fieldName, extension) => {
|
|
2455
|
+
return (control) => {
|
|
2456
|
+
if (!control.parent) {
|
|
2457
|
+
return null;
|
|
2458
|
+
}
|
|
2459
|
+
const matchingControl = control.parent.get(fieldName);
|
|
2460
|
+
const strToCheck = matchingControl.value;
|
|
2461
|
+
if (strToCheck === extension || strToCheck.includes(extension)) {
|
|
2462
|
+
return {
|
|
2463
|
+
mailboxExtension: true
|
|
2464
|
+
};
|
|
2465
|
+
}
|
|
2466
|
+
return null;
|
|
2467
|
+
};
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
e164MaskLabel(control) {
|
|
2471
|
+
const ruleText = `^[0-9*#+X]{0,24}$`;
|
|
2472
|
+
const rule = new RegExp(ruleText, 'g');
|
|
2473
|
+
if (control.value && rule && !rule.test(control.value)) {
|
|
2474
|
+
return { e164MaskRule: { rule: ruleText } };
|
|
2475
|
+
}
|
|
2476
|
+
return null;
|
|
2477
|
+
}
|
|
2478
|
+
index(control) {
|
|
2479
|
+
const value = parseInt(control.value);
|
|
2480
|
+
if (!value) {
|
|
2481
|
+
return null;
|
|
2482
|
+
}
|
|
2483
|
+
const pattern = '^[+0-9]*$';
|
|
2484
|
+
if (value && !Number.isInteger(value) || value < 1 || value > 199) {
|
|
2485
|
+
return { indexRule: true };
|
|
2486
|
+
}
|
|
2487
|
+
return null;
|
|
2488
|
+
}
|
|
2489
|
+
displayLabel(control) {
|
|
2490
|
+
const ruleText = `^[^""""%&<>]{0,30}$`;
|
|
2491
|
+
const rule = new RegExp(ruleText, 'g');
|
|
2492
|
+
if (rule && !rule.test(control.value)) {
|
|
2493
|
+
return { labelRule: { rule: ruleText, count: 30 } };
|
|
2494
|
+
}
|
|
2495
|
+
return null;
|
|
2496
|
+
}
|
|
2497
|
+
displayLabelAscii(control) {
|
|
2498
|
+
const ruleText = '^[a-zA-Z0-9 !#$\'()*+,./:;=?@\\^_`}~-]{0,30}$';
|
|
2499
|
+
const rule = new RegExp(ruleText, 'g');
|
|
2500
|
+
if (rule && !rule.test(control.value)) {
|
|
2501
|
+
return { labelRule: { rule: ruleText, count: 30 } };
|
|
2502
|
+
}
|
|
2503
|
+
return null;
|
|
2504
|
+
}
|
|
2505
|
+
requiredForSpeedDialPosition(type) {
|
|
2506
|
+
return (control) => {
|
|
2507
|
+
const parent = control.parent;
|
|
2508
|
+
if (type === SpeedDialType.slotBasic || !parent) {
|
|
2509
|
+
return null;
|
|
2510
|
+
}
|
|
2511
|
+
if (!control.value) {
|
|
2512
|
+
return { required: true };
|
|
2513
|
+
}
|
|
2514
|
+
return null;
|
|
2515
|
+
};
|
|
2516
|
+
}
|
|
2517
|
+
speedDialDestination() {
|
|
2518
|
+
return (control) => {
|
|
2519
|
+
if (!control || !control.value) {
|
|
2520
|
+
return null;
|
|
2521
|
+
}
|
|
2522
|
+
const numberOrHostNameIP = '' +
|
|
2523
|
+
'^([0-9\\*#+PpCcFf,]+)$' +
|
|
2524
|
+
'|' +
|
|
2525
|
+
'^(' +
|
|
2526
|
+
'([a-zA-Z0-9]){1,47}@' +
|
|
2527
|
+
'(' +
|
|
2528
|
+
'((?:[0-9]{1,3}\\.){3}[0-9]{1,3})' +
|
|
2529
|
+
'|' +
|
|
2530
|
+
'([a-zA-Z0-9][a-zA-Z0-9\\-]{1,61}[a-zA-Z0-9]\\.[a-zA-Z]{2,})' +
|
|
2531
|
+
')' +
|
|
2532
|
+
')$';
|
|
2533
|
+
const rule = new RegExp(numberOrHostNameIP, 'g');
|
|
2534
|
+
if (rule && !rule.test(control.value)) {
|
|
2535
|
+
return { pattern: true };
|
|
2536
|
+
}
|
|
2537
|
+
return null;
|
|
2538
|
+
};
|
|
2539
|
+
}
|
|
2540
|
+
requiredForSpeedDialDestination(type) {
|
|
2541
|
+
return (control) => {
|
|
2542
|
+
const parent = control.parent;
|
|
2543
|
+
if ((!parent || !parent.get('label')) || (type === SpeedDialType.slotBasic && !control.value && !parent.get('label').value)) {
|
|
2544
|
+
return null;
|
|
2545
|
+
}
|
|
2546
|
+
return null;
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
labelPatternDependingOnType(control) {
|
|
2550
|
+
const parent = control?.parent;
|
|
2551
|
+
if (!parent || !parent.get('type') || !control.value) {
|
|
2552
|
+
return null;
|
|
2553
|
+
}
|
|
2554
|
+
const type = parent.get('type').value;
|
|
2555
|
+
if (!type && !speedDialRegex.test(control.value)) {
|
|
2556
|
+
return { labelRule: { wrong: '"' } };
|
|
2557
|
+
}
|
|
2558
|
+
if (type && !BLFRegex.test(control.value)) {
|
|
2559
|
+
return { labelRule: { wrong: '"><&%' } };
|
|
2560
|
+
}
|
|
2561
|
+
return null;
|
|
2562
|
+
}
|
|
2563
|
+
labelPatternBLF(control) {
|
|
2564
|
+
if (control.value && !BLFRegex.test(control.value)) {
|
|
2565
|
+
return { labelRule: { wrong: '"><&%' } };
|
|
2566
|
+
}
|
|
2567
|
+
return null;
|
|
2568
|
+
}
|
|
2569
|
+
labelPatternSpeedDial(control) {
|
|
2570
|
+
if (control?.value && !speedDialRegex.test(control.value)) {
|
|
2571
|
+
return { labelRule: { wrong: '"' } };
|
|
2572
|
+
}
|
|
2573
|
+
return null;
|
|
2574
|
+
}
|
|
2575
|
+
getMatchExistingVmLineValue(dnWithType) {
|
|
2576
|
+
const ind = dnWithType.indexOf('Type:');
|
|
2577
|
+
let dn = dnWithType;
|
|
2578
|
+
if (ind > -1) {
|
|
2579
|
+
dn = dnWithType.slice(0, ind);
|
|
2580
|
+
dn = dn.trim();
|
|
2581
|
+
}
|
|
2582
|
+
return dn;
|
|
2583
|
+
}
|
|
2584
|
+
getOptionsList(token) {
|
|
2585
|
+
switch (token) {
|
|
2586
|
+
case 'css':
|
|
2587
|
+
case 'rerouteCss':
|
|
2588
|
+
case 'callingSearchSpace':
|
|
2589
|
+
return this.siteSettingsService.callingSearchSpaceTypes;
|
|
2590
|
+
case 'reroutingCss':
|
|
2591
|
+
return this.siteSettingsService.siteDefaults && this.siteSettingsService.siteDefaults.cssFilter;
|
|
2592
|
+
case 'deviceType':
|
|
2593
|
+
return this.siteSettingsService.deviceTypes;
|
|
2594
|
+
case 'routePartition':
|
|
2595
|
+
return this.siteSettingsService.routePartitionNames;
|
|
2596
|
+
case 'routePartitionFiltered':
|
|
2597
|
+
return this.siteSettingsService.filteredRoutePartitionNames;
|
|
2598
|
+
case 'devicePools':
|
|
2599
|
+
return this.siteSettingsService.devicePools;
|
|
2600
|
+
case 'allRoutePartitions':
|
|
2601
|
+
return this.siteSettingsService.allRoutePartitionNames;
|
|
2602
|
+
case 'directoryNumbers':
|
|
2603
|
+
return this.siteSettingsService.directoryNumbers;
|
|
2604
|
+
default:
|
|
2605
|
+
return [];
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
autocompleteType(control) {
|
|
2609
|
+
if (!control.value) {
|
|
2610
|
+
return null;
|
|
2611
|
+
}
|
|
2612
|
+
if (typeof control.value !== 'object' && control.value !== '') {
|
|
2613
|
+
return {
|
|
2614
|
+
stringEntered: true
|
|
2615
|
+
};
|
|
2616
|
+
}
|
|
2617
|
+
return null;
|
|
2618
|
+
}
|
|
2619
|
+
password(control) {
|
|
2620
|
+
const ruleNumeric = new RegExp(/\d+/, 'g');
|
|
2621
|
+
const ruleCapitals = new RegExp(/[A-Z]+/, 'g');
|
|
2622
|
+
const ruleSmall = new RegExp(/[a-z]+/, 'g');
|
|
2623
|
+
const ruleSpecial = new RegExp(/[!@#$%&\/=\?_\.,:;\-\\+]+/, 'g');
|
|
2624
|
+
const hasNumeric = +ruleNumeric.test(control.value);
|
|
2625
|
+
const hasCapitals = +ruleCapitals.test(control.value);
|
|
2626
|
+
const hasSmall = +ruleSmall.test(control.value);
|
|
2627
|
+
const hasSpecial = +ruleSpecial.test(control.value);
|
|
2628
|
+
if (hasNumeric + hasCapitals + hasSmall + hasSpecial < 3) {
|
|
2629
|
+
return {
|
|
2630
|
+
weakPassword: true
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2633
|
+
return null;
|
|
2634
|
+
}
|
|
2635
|
+
verifyAutoAnswer(control) {
|
|
2636
|
+
if (!control?.value || control.value.length === 0) {
|
|
2637
|
+
return null;
|
|
2638
|
+
}
|
|
2639
|
+
let autoAnswerErrorLine = null;
|
|
2640
|
+
if (control.parent && control.parent.parent && control.parent.parent.parent && control.parent.parent.parent.parent) {
|
|
2641
|
+
const controlSNR = control.parent;
|
|
2642
|
+
const controlUser = control.parent.parent.parent.parent;
|
|
2643
|
+
const lineAssociations = controlSNR.get('lineAssociations');
|
|
2644
|
+
const lines = controlUser.get('lines');
|
|
2645
|
+
if (lines) {
|
|
2646
|
+
lineAssociations.value.forEach((lineAssociation) => {
|
|
2647
|
+
const autoAnswerLine = lines.controls.find((line) => line.get('directoryNumber').value.directoryNumber === lineAssociation.directoryNumber && line.get('directoryNumber').value.routePartitionName === lineAssociation.routePartitionName
|
|
2648
|
+
&& line.get('autoAnswer').value !== 'Auto Answer Off');
|
|
2649
|
+
if (autoAnswerLine) {
|
|
2650
|
+
autoAnswerErrorLine = {
|
|
2651
|
+
autoAnswerErrorLine: lineAssociation.directoryNumber
|
|
2652
|
+
};
|
|
2653
|
+
}
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
return autoAnswerErrorLine;
|
|
2658
|
+
}
|
|
2659
|
+
verifyBeginEndTime(control) {
|
|
2660
|
+
const parent = control.parent;
|
|
2661
|
+
if (!parent || !parent.get('isActive') || !parent.get('allDay') || !parent.get('from') || !parent.get('to')) {
|
|
2662
|
+
return null;
|
|
2663
|
+
}
|
|
2664
|
+
if (parent.get('isActive').value) {
|
|
2665
|
+
if (!parent.get('allDay').value) {
|
|
2666
|
+
if (!parent.get('from').value || parent.get('from').value === 'No Office Hours'
|
|
2667
|
+
|| !parent.get('to').value || parent.get('to').value === 'No Office Hours'
|
|
2668
|
+
|| parent.get('from').value > parent.get('to').value) {
|
|
2669
|
+
return {
|
|
2670
|
+
fromGreaterThanTo: true
|
|
2671
|
+
};
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
return null;
|
|
2676
|
+
}
|
|
2677
|
+
time(control) {
|
|
2678
|
+
if (control.value && !timeRegex.test(control.value)) {
|
|
2679
|
+
return { timeFormat: true };
|
|
2680
|
+
}
|
|
2681
|
+
return null;
|
|
2682
|
+
}
|
|
2683
|
+
pinOrderCheck(str) {
|
|
2684
|
+
if (str) {
|
|
2685
|
+
const arr_num = ('' + str).split('');
|
|
2686
|
+
for (let i = 0; i < arr_num.length - 2; i++) {
|
|
2687
|
+
const num1 = parseInt(arr_num[i]);
|
|
2688
|
+
const num2 = parseInt(arr_num[i + 1]);
|
|
2689
|
+
const num3 = parseInt(arr_num[i + 2]);
|
|
2690
|
+
if ((num2 - num1) === 1 && (num3 - num2 === num2 - num1)) {
|
|
2691
|
+
return true;
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
return false;
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
isItemAlreadyInList(item, list) {
|
|
2698
|
+
if (!item || !list || !list.length) {
|
|
2699
|
+
return false;
|
|
2700
|
+
}
|
|
2701
|
+
for (const listItem of list) {
|
|
2702
|
+
if (item.equals(listItem)) {
|
|
2703
|
+
return true;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
return false;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
ValidationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ValidationService, deps: [{ token: SiteSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2710
|
+
ValidationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ValidationService });
|
|
2711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ValidationService, decorators: [{
|
|
2712
|
+
type: Injectable
|
|
2713
|
+
}], ctorParameters: function () { return [{ type: SiteSettingsService }]; } });
|
|
2714
|
+
|
|
2715
|
+
class DeviceAssociatedLineDetailsBoxComponent {
|
|
2716
|
+
constructor() {
|
|
2717
|
+
this.title = '';
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
DeviceAssociatedLineDetailsBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineDetailsBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2721
|
+
DeviceAssociatedLineDetailsBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceAssociatedLineDetailsBoxComponent, selector: "app-line-details-block", inputs: { title: "title" }, ngImport: i0, template: "<div class=\"line-details-block\">\r\n <div class=\"line-details-block__title\">{{ title }}</div>\r\n <div class=\"line-details-block__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".line-details-block{display:flex;padding:1rem 1.5rem}.line-details-block__title{width:150px;max-width:150px;font-weight:500}.line-details-block__content{display:flex;flex-direction:column;width:100%;margin-left:2.5rem}\n"] });
|
|
2722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineDetailsBoxComponent, decorators: [{
|
|
2723
|
+
type: Component,
|
|
2724
|
+
args: [{ selector: "app-line-details-block", template: "<div class=\"line-details-block\">\r\n <div class=\"line-details-block__title\">{{ title }}</div>\r\n <div class=\"line-details-block__content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [".line-details-block{display:flex;padding:1rem 1.5rem}.line-details-block__title{width:150px;max-width:150px;font-weight:500}.line-details-block__content{display:flex;flex-direction:column;width:100%;margin-left:2.5rem}\n"] }]
|
|
2725
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
2726
|
+
type: Input
|
|
2727
|
+
}] } });
|
|
2728
|
+
|
|
2729
|
+
class DeviceAssociatedLineComponent {
|
|
2730
|
+
get form() {
|
|
2731
|
+
return this.userService?.user?.devices[this.deviceIndex] && this.userService?.user?.devices[this.deviceIndex].lineAssociations[this.lineIndex].form;
|
|
2732
|
+
}
|
|
2733
|
+
get lineAssociation() {
|
|
2734
|
+
return this.userService?.user?.devices[this.deviceIndex].lineAssociations[this.lineIndex];
|
|
2735
|
+
}
|
|
2736
|
+
get originLineAssociation() {
|
|
2737
|
+
return this.userService?.originUser?.devices[this.deviceIndex].lineAssociations[this.lineIndex];
|
|
2738
|
+
}
|
|
2739
|
+
get user() {
|
|
2740
|
+
return this.userService.user;
|
|
2741
|
+
}
|
|
2742
|
+
constructor(userService, apiService, siteSettingsService, lineService, deviceService, dialog, validationService) {
|
|
2743
|
+
this.userService = userService;
|
|
2744
|
+
this.apiService = apiService;
|
|
2745
|
+
this.siteSettingsService = siteSettingsService;
|
|
2746
|
+
this.lineService = lineService;
|
|
2747
|
+
this.deviceService = deviceService;
|
|
2748
|
+
this.dialog = dialog;
|
|
2749
|
+
this.validationService = validationService;
|
|
2750
|
+
this.updatedLineAssociationEvent = new EventEmitter();
|
|
2751
|
+
this.onChange = new EventEmitter();
|
|
2752
|
+
this.recordingOptions = RecordingOptions;
|
|
2753
|
+
this.recordingMediaSources = RECORDING_MEDIA_SOURCE;
|
|
2754
|
+
this.staticOptions = STATIC_OPTIONS;
|
|
2755
|
+
this.subscriptions = [];
|
|
2756
|
+
}
|
|
2757
|
+
ngOnInit() {
|
|
2758
|
+
this.getData();
|
|
2759
|
+
this.lineService.onSaveLineAssociationEvent
|
|
2760
|
+
.subscribe(() => {
|
|
2761
|
+
this.updateLine(this.lineAssociation);
|
|
2762
|
+
});
|
|
2763
|
+
}
|
|
2764
|
+
ngOnDestroy() {
|
|
2765
|
+
if (this.subscriptions?.length) {
|
|
2766
|
+
this.subscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
onChangeField(token) {
|
|
2770
|
+
if (!token) {
|
|
2771
|
+
return;
|
|
2772
|
+
}
|
|
2773
|
+
this.userService.user.devices[this.deviceIndex].lineAssociations[this.lineIndex][token] = this.form?.get(token)?.value;
|
|
2774
|
+
this.setHasChangesToLine();
|
|
2775
|
+
this.onChange.emit();
|
|
2776
|
+
}
|
|
2777
|
+
onAutocomplete(token) {
|
|
2778
|
+
const value = this.form?.get(token)?.value;
|
|
2779
|
+
this.filteredMonitorCssList = UtilsService.filterOptions(this.monitorCssList, value);
|
|
2780
|
+
}
|
|
2781
|
+
recordingOptionChanged(token) {
|
|
2782
|
+
const value = this.form.get(token)?.value;
|
|
2783
|
+
this.onChangeField(token);
|
|
2784
|
+
if (value === RecordingOptions.auto_enabled || value === RecordingOptions.selective_enabled) {
|
|
2785
|
+
if (!this.form?.get('recordingProfile')?.touched) {
|
|
2786
|
+
this.form.get('recordingProfile')?.markAsTouched();
|
|
2787
|
+
}
|
|
2788
|
+
this.form.get('recordingProfile')?.enable();
|
|
2789
|
+
this.form.get('recordingMediaSource')?.enable();
|
|
2790
|
+
}
|
|
2791
|
+
else {
|
|
2792
|
+
this.form.get('recordingProfile')?.disable();
|
|
2793
|
+
this.form.get('recordingProfile')?.setValue('');
|
|
2794
|
+
this.onChangeField('recordingProfile');
|
|
2795
|
+
/* if (!this.authService.hasRole('SUPER_USER')) {
|
|
2796
|
+
recordingMediaSource.disable();
|
|
2797
|
+
recordingMediaSource.setValue(this.recordingMediaSources[0]);
|
|
2798
|
+
this.changeField('recordingMediaSource');
|
|
2799
|
+
}*/
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
getRule() {
|
|
2803
|
+
// @ts-ignore
|
|
2804
|
+
if (this.form.get('e164Mask')?.errors && this.form.get('e164Mask')?.errors['e164MaskRule']) {
|
|
2805
|
+
// @ts-ignore
|
|
2806
|
+
return this.form.get('e164Mask')?.errors['e164MaskRule']['rule'];
|
|
2807
|
+
}
|
|
2808
|
+
return '';
|
|
2809
|
+
}
|
|
2810
|
+
toggleEditMode() {
|
|
2811
|
+
this.userService.user.toggleEditMode();
|
|
2812
|
+
}
|
|
2813
|
+
isSavingDisabled() {
|
|
2814
|
+
return !this.userService.hasUnsavedChanges() || this.userService.hasExistedUserId;
|
|
2815
|
+
}
|
|
2816
|
+
onChangeExtension(value) {
|
|
2817
|
+
if (this.lineAssociation && this.lineAssociation.directoryNumber) {
|
|
2818
|
+
this.userService.user.devices[0].lineAssociations[0].directoryNumber.directoryNumber = value;
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
onLineRemove() {
|
|
2822
|
+
}
|
|
2823
|
+
getData() {
|
|
2824
|
+
this.dataPending = true;
|
|
2825
|
+
const subscription = this.siteSettingsService.getMonitorCss(this.siteId)
|
|
2826
|
+
.subscribe((res) => {
|
|
2827
|
+
this.monitorCssList = res?.length ? res.slice() : [];
|
|
2828
|
+
this.filteredMonitorCssList = res?.length ? res.slice() : [];
|
|
2829
|
+
});
|
|
2830
|
+
this.subscriptions.push(subscription);
|
|
2831
|
+
}
|
|
2832
|
+
updateLine(line) {
|
|
2833
|
+
const body = this.lineService.getLineAssociationBody(this.originLineAssociation, this.lineAssociation);
|
|
2834
|
+
console.log('update line', body);
|
|
2835
|
+
this.deviceService.dataPending = true;
|
|
2836
|
+
this.deviceService.putDeviceFields(this.siteId, this.deviceName, this.userService.user.token, body)
|
|
2837
|
+
.subscribe(() => {
|
|
2838
|
+
this.userService.persistUserCache()
|
|
2839
|
+
.subscribe(() => {
|
|
2840
|
+
this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
|
|
2841
|
+
.subscribe(() => {
|
|
2842
|
+
this.updatedLineAssociationEvent.emit();
|
|
2843
|
+
this.deviceService.dataPending = false;
|
|
2844
|
+
}, () => this.deviceService.dataPending = false);
|
|
2845
|
+
}, () => this.deviceService.dataPending = true);
|
|
2846
|
+
}, () => this.deviceService.dataPending = true);
|
|
2847
|
+
}
|
|
2848
|
+
deleteLine(line) {
|
|
2849
|
+
this.lineService.deleteLine(this.siteId, line.linePkid, this.userService.user.token)
|
|
2850
|
+
.subscribe(() => {
|
|
2851
|
+
this.userService.persistUserCache()
|
|
2852
|
+
.subscribe(() => {
|
|
2853
|
+
this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
|
|
2854
|
+
.subscribe(() => {
|
|
2855
|
+
this.updatedLineAssociationEvent.emit();
|
|
2856
|
+
});
|
|
2857
|
+
});
|
|
2858
|
+
});
|
|
2859
|
+
}
|
|
2860
|
+
setHasChangesToLine() {
|
|
2861
|
+
if (this.lineAssociation) {
|
|
2862
|
+
this.userService.user.devices[this.deviceIndex].lineAssociations[this.lineIndex].hasChanges = !this.lineAssociation.fullEqual(this.originLineAssociation);
|
|
2863
|
+
this.userService.user.devices[this.deviceIndex].lineAssociationsHasChanges = !this.lineAssociation.fullEqual(this.originLineAssociation);
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
DeviceAssociatedLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineComponent, deps: [{ token: UserService }, { token: APIService }, { token: SiteSettingsService }, { token: LineService }, { token: DeviceService }, { token: i1$1.MatDialog }, { token: ValidationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2868
|
+
DeviceAssociatedLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceAssociatedLineComponent, selector: "app-device-associated-line", inputs: { lineIndex: "lineIndex", deviceIndex: "deviceIndex", deviceName: "deviceName", siteId: "siteId" }, outputs: { updatedLineAssociationEvent: "updatedLineAssociationEvent", onChange: "onChange" }, ngImport: i0, template: "<div id=\"device-associated-line\" *ngIf=\"lineAssociation && form\" [formGroup]=\"form\">\r\n <ng-container class=\"line-details__container\">\r\n <app-line-details-block [title]=\"'Line setting on the device'\">\r\n <div class=\"form-group\">\r\n <label>Display Caller ID</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"displayLabel\" formControlName=\"displayLabel\"\r\n (input)=\"onChangeField('displayLabel')\">\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Text Label</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"textLabel\" name=\"textLabel\"\r\n matInput (input)=\"onChangeField('textLabel')\">\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>External Phone Number Mask</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"e164Mask\" formControlName=\"e164Mask\"\r\n (input)=\"onChangeField('e164Mask')\">\r\n <mat-error *ngIf=\"form.get('e164Mask')?.hasError('e164MaskRule')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n e164Mask does not match the rule {{getRule()}}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Multiple Call/Call Waiting Settings'\">\r\n <div class=\"form-group\">\r\n <label>Max Calls</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"maxNumberOfCalls\" formControlName=\"maxNumberOfCalls\"\r\n (input)=\"onChangeField('maxNumberOfCalls')\">\r\n <mat-error *ngIf=\"form.get('maxNumberOfCalls')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value is too big\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Busy Trigger</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"busyTrigger\" formControlName=\"busyTrigger\"\r\n (input)=\"onChangeField('busyTrigger')\">\r\n <mat-error *ngIf=\"form.get('busyTrigger')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value can't be bigger than Max Calls\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Call Recording'\">\r\n <div class=\"form-group\">\r\n <label>Recording Option</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"recordingOptionChanged('recordingOption')\"\r\n formControlName=\"recordingOption\"\r\n [id]=\"'associatedLineRecordingOptionField'\">\r\n <mat-option [value]=recordingOptions.disabled>Call Recording Disabled</mat-option>\r\n <mat-option [value]=recordingOptions.auto_enabled>Automatic Call Recording Enabled</mat-option>\r\n <mat-option [value]=recordingOptions.selective_enabled>Selective Call Recording Enabled</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Media Source</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"onChangeField('recordingMediaSource')\" formControlName=\"recordingMediaSource\"\r\n [id]=\"'associatedLineRecordingMediaSourceField'\">\r\n <mat-option *ngFor=\"let source of recordingMediaSources\" [value]=\"source\">{{source}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Profile</label>\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'recordingProfile'\"\r\n [form]=\"form\"\r\n (changeField)=\"onChangeField('recordingProfile')\"\r\n [optionsToken]=\"'recordingProfile'\"></app-lazy-loading-select>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Additional line settings on the device'\">\r\n <div class=\"form-group\">\r\n <label>Visual Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"visualMWI\"\r\n (selectionChange)=\"onChangeField('visualMWI')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.VISUAL_MWI\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_idle\"\r\n (selectionChange)=\"onChangeField('ringSetting_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select name=\"pickupAAS_idle\"\r\n formControlName=\"pickupAAS_idle\"\r\n (selectionChange)=\"onChangeField('pickupAAS_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Monitoring Calling Search Space</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n [matAutocomplete]=\"auto\"\r\n matInput\r\n (input)=\"onAutocomplete('monitorCSS')\"\r\n formControlName=\"monitorCSS\">\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n (optionSelected)=\"onChangeField('monitorCSS')\">\r\n <mat-option *ngFor=\"let option of filteredMonitorCssList\" [value]=\"option\" >\r\n {{option}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Audible Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"audibleMWI\"\r\n (selectionChange)=\"onChangeField('audibleMWI')\">\r\n <mat-option *ngFor=\"let option of staticOptions.DEFAULT_ON_OFF\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_active\"\r\n (selectionChange)=\"onChangeField('ringSetting_active')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_ACTIVE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"pickupAAS_active\"\r\n (selectionChange)=\"onChangeField('pickupAAS_active')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_ACTIVE\"\r\n [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Log Missed Calls</label>\r\n <mat-slide-toggle name=\"logMissedCalls\" formControlName=\"logMissedCall\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Forwardred call information display'\">\r\n <div class=\"form-group\">\r\n <label>Caller Name</label>\r\n <mat-slide-toggle name=\"callerName\" formControlName=\"callerName\" (change)=\"onChangeField('callerName')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Redirected Number</label>\r\n <mat-slide-toggle name=\"redirectedNumber\" formControlName=\"redirectedNumber\" (change)=\"onChangeField('redirectedNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Caller Number</label>\r\n <mat-slide-toggle name=\"callerNumber\" formControlName=\"callerNumber\" (change)=\"onChangeField('callerNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Dialed Number</label>\r\n <mat-slide-toggle name=\"dialedNumber\" formControlName=\"dialedNumber\" (change)=\"onChangeField('dialedNumber')\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n </ng-container>\r\n\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}#device-associated-line{background-color:#fff;padding:1rem;position:relative;border-left:3px solid #737480}.form-group{display:flex;align-items:center}.form-group__separator,.form-group__separator_2px{width:100%;height:1px;background-color:#cccccc80;margin:1rem 0}.form-group__separator_2px{height:2px}.form-group label{width:200px;max-width:200px;font-size:14px;color:#666}.form-group input{width:300px}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#009dff!important}.mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#fff!important}.form-group .mat-form-field{max-width:300px}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.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: i9.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i9.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i11.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: i12.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i12.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: LazyLoadingSelectComponent, selector: "app-lazy-loading-select", inputs: ["siteId", "form", "standalone", "placeholder", "controlName", "optionsToken", "appearance", "errorCode", "errorText", "default", "id"], outputs: ["changeField"] }, { kind: "component", type: DeviceAssociatedLineDetailsBoxComponent, selector: "app-line-details-block", inputs: ["title"] }] });
|
|
2869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineComponent, decorators: [{
|
|
2870
|
+
type: Component,
|
|
2871
|
+
args: [{ selector: 'app-device-associated-line', template: "<div id=\"device-associated-line\" *ngIf=\"lineAssociation && form\" [formGroup]=\"form\">\r\n <ng-container class=\"line-details__container\">\r\n <app-line-details-block [title]=\"'Line setting on the device'\">\r\n <div class=\"form-group\">\r\n <label>Display Caller ID</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"displayLabel\" formControlName=\"displayLabel\"\r\n (input)=\"onChangeField('displayLabel')\">\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('displayLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Text Label</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"textLabel\" name=\"textLabel\"\r\n matInput (input)=\"onChangeField('textLabel')\">\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('maxlength')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field can\u2019t have more than 30 characters\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get('textLabel')?.hasError('pattern')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Invalid symbols are used\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>External Phone Number Mask</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"text\" name=\"e164Mask\" formControlName=\"e164Mask\"\r\n (input)=\"onChangeField('e164Mask')\">\r\n <mat-error *ngIf=\"form.get('e164Mask')?.hasError('e164MaskRule')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n e164Mask does not match the rule {{getRule()}}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Multiple Call/Call Waiting Settings'\">\r\n <div class=\"form-group\">\r\n <label>Max Calls</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"maxNumberOfCalls\" formControlName=\"maxNumberOfCalls\"\r\n (input)=\"onChangeField('maxNumberOfCalls')\">\r\n <mat-error *ngIf=\"form.get('maxNumberOfCalls')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value is too big\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Busy Trigger</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput type=\"number\" name=\"busyTrigger\" formControlName=\"busyTrigger\"\r\n (input)=\"onChangeField('busyTrigger')\">\r\n <mat-error *ngIf=\"form.get('busyTrigger')?.hasError('max')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n Value can't be bigger than Max Calls\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Call Recording'\">\r\n <div class=\"form-group\">\r\n <label>Recording Option</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"recordingOptionChanged('recordingOption')\"\r\n formControlName=\"recordingOption\"\r\n [id]=\"'associatedLineRecordingOptionField'\">\r\n <mat-option [value]=recordingOptions.disabled>Call Recording Disabled</mat-option>\r\n <mat-option [value]=recordingOptions.auto_enabled>Automatic Call Recording Enabled</mat-option>\r\n <mat-option [value]=recordingOptions.selective_enabled>Selective Call Recording Enabled</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Media Source</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n (selectionChange)=\"onChangeField('recordingMediaSource')\" formControlName=\"recordingMediaSource\"\r\n [id]=\"'associatedLineRecordingMediaSourceField'\">\r\n <mat-option *ngFor=\"let source of recordingMediaSources\" [value]=\"source\">{{source}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Recording Profile</label>\r\n <app-lazy-loading-select\r\n [siteId]=\"siteId\"\r\n [controlName]=\"'recordingProfile'\"\r\n [form]=\"form\"\r\n (changeField)=\"onChangeField('recordingProfile')\"\r\n [optionsToken]=\"'recordingProfile'\"></app-lazy-loading-select>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Additional line settings on the device'\">\r\n <div class=\"form-group\">\r\n <label>Visual Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"visualMWI\"\r\n (selectionChange)=\"onChangeField('visualMWI')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.VISUAL_MWI\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_idle\"\r\n (selectionChange)=\"onChangeField('ringSetting_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Idle)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select name=\"pickupAAS_idle\"\r\n formControlName=\"pickupAAS_idle\"\r\n (selectionChange)=\"onChangeField('pickupAAS_idle')\">\r\n <mat-option *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_IDLE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Monitoring Calling Search Space</label>\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n [matAutocomplete]=\"auto\"\r\n matInput\r\n (input)=\"onAutocomplete('monitorCSS')\"\r\n formControlName=\"monitorCSS\">\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n (optionSelected)=\"onChangeField('monitorCSS')\">\r\n <mat-option *ngFor=\"let option of filteredMonitorCssList\" [value]=\"option\" >\r\n {{option}}\r\n </mat-option>\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Audible Message Waiting Indicator Policy</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"audibleMWI\"\r\n (selectionChange)=\"onChangeField('audibleMWI')\">\r\n <mat-option *ngFor=\"let option of staticOptions.DEFAULT_ON_OFF\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Ring Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"ringSetting_active\"\r\n (selectionChange)=\"onChangeField('ringSetting_active')\">\r\n <mat-option *ngFor=\"let option of staticOptions.RING_SETTING_ACTIVE\" [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Call Pickup Audio Alert Setting (Phone Active)</label>\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select\r\n formControlName=\"pickupAAS_active\"\r\n (selectionChange)=\"onChangeField('pickupAAS_active')\">\r\n <mat-option\r\n *ngFor=\"let option of staticOptions.CALL_PICKUP_GROUP_AUDIO_SETTING_PHONE_ACTIVE\"\r\n [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Log Missed Calls</label>\r\n <mat-slide-toggle name=\"logMissedCalls\" formControlName=\"logMissedCall\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n <div class=\"form-group__separator_2px\"></div>\r\n <app-line-details-block [title]=\"'Forwardred call information display'\">\r\n <div class=\"form-group\">\r\n <label>Caller Name</label>\r\n <mat-slide-toggle name=\"callerName\" formControlName=\"callerName\" (change)=\"onChangeField('callerName')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Redirected Number</label>\r\n <mat-slide-toggle name=\"redirectedNumber\" formControlName=\"redirectedNumber\" (change)=\"onChangeField('redirectedNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Caller Number</label>\r\n <mat-slide-toggle name=\"callerNumber\" formControlName=\"callerNumber\" (change)=\"onChangeField('callerNumber')\"></mat-slide-toggle>\r\n </div>\r\n <div class=\"form-group__separator\"></div>\r\n <div class=\"form-group\">\r\n <label>Dialed Number</label>\r\n <mat-slide-toggle name=\"dialedNumber\" formControlName=\"dialedNumber\" (change)=\"onChangeField('dialedNumber')\"></mat-slide-toggle>\r\n </div>\r\n </app-line-details-block>\r\n </ng-container>\r\n\r\n</div>\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}#device-associated-line{background-color:#fff;padding:1rem;position:relative;border-left:3px solid #737480}.form-group{display:flex;align-items:center}.form-group__separator,.form-group__separator_2px{width:100%;height:1px;background-color:#cccccc80;margin:1rem 0}.form-group__separator_2px{height:2px}.form-group label{width:200px;max-width:200px;font-size:14px;color:#666}.form-group input{width:300px}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#009dff!important}.mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#fff!important}.form-group .mat-form-field{max-width:300px}\n"] }]
|
|
2872
|
+
}], ctorParameters: function () { return [{ type: UserService }, { type: APIService }, { type: SiteSettingsService }, { type: LineService }, { type: DeviceService }, { type: i1$1.MatDialog }, { type: ValidationService }]; }, propDecorators: { lineIndex: [{
|
|
2873
|
+
type: Input
|
|
2874
|
+
}], deviceIndex: [{
|
|
2875
|
+
type: Input
|
|
2876
|
+
}], deviceName: [{
|
|
2877
|
+
type: Input
|
|
2878
|
+
}], siteId: [{
|
|
2879
|
+
type: Input
|
|
2880
|
+
}], updatedLineAssociationEvent: [{
|
|
2881
|
+
type: Output
|
|
2882
|
+
}], onChange: [{
|
|
2883
|
+
type: Output
|
|
2884
|
+
}] } });
|
|
2885
|
+
|
|
2886
|
+
class AssociatedLineRowComponent {
|
|
2887
|
+
constructor() {
|
|
2888
|
+
this.toggled = false;
|
|
2889
|
+
this.toggleAssociatedLine = new EventEmitter();
|
|
2890
|
+
this.removeAssociatedLine = new EventEmitter();
|
|
2891
|
+
}
|
|
2892
|
+
onToggleDetails() {
|
|
2893
|
+
this.toggled = !this.toggled;
|
|
2894
|
+
this.toggleAssociatedLine.emit(this.toggled ? this.line.displayLabel : '');
|
|
2895
|
+
}
|
|
2896
|
+
onLineRemove() {
|
|
2897
|
+
this.removeAssociatedLine.emit();
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
AssociatedLineRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssociatedLineRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2901
|
+
AssociatedLineRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AssociatedLineRowComponent, selector: "app-associated-line-row", inputs: { line: "line", toggled: "toggled" }, outputs: { toggleAssociatedLine: "toggleAssociatedLine", removeAssociatedLine: "removeAssociatedLine" }, ngImport: i0, template: "<div class=\"line-item\">\r\n <div class=\"line-informations\">\r\n <div class=\"line-drag\">\r\n <i class=\"app-icon icon-dragger-vertical\"></i>\r\n </div>\r\n <div class=\"line-label\">Button Position {{ line.position }}</div>\r\n <div class=\"line-sep flex-box\">\r\n <div class=\"app-icon icon-vertical-divider\"></div>\r\n <div class=\"line-dn-box\">Line {{line?.directoryNumber?.directoryNumber}}</div>\r\n </div>\r\n <div class=\"line-name\">{{ line.displayLabel }}</div>\r\n </div>\r\n <div class=\"line-actions\">\r\n <div class=\"line-delete\">\r\n <i class=\"app-icon icon-delete\" (click)=\"onLineRemove()\"></i>\r\n </div>\r\n <div class=\"line-toggle-details\" (click)=\"onToggleDetails()\">\r\n <i class=\"app-icon icon-arrow-right\"></i>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".line-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-radius:.5rem;border:1px solid #cfcfcf;padding:1rem;margin:1rem 0 0;z-index:10}.line-informations,.line-actions{display:inherit;align-items:inherit;gap:.5rem;padding:0 .5rem}.line-actions{cursor:pointer}.line-drag,.line-toggle-details,.line-delete{display:inherit;align-items:inherit;justify-content:center;font-size:1rem;color:#969696;width:36px;height:36px;border-radius:50%;transition:all .25s ease-out}.line-delete :hover{color:red!important}.line-drag{cursor:grab}.line-label{margin-right:2.5rem}.flex-box{display:flex;justify-content:flex-start}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.toggled{transform:rotate(-90deg)}.line-dn-box{line-height:20px}.icon-dragger-vertical{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.125 5C12.7935 5 12.4755 4.8683 12.2411 4.63388C12.0067 4.39946 11.875 4.08152 11.875 3.75C11.875 3.41848 12.0067 3.10054 12.2411 2.86612C12.4755 2.6317 12.7935 2.5 13.125 2.5C13.4565 2.5 13.7745 2.6317 14.0089 2.86612C14.2433 3.10054 14.375 3.41848 14.375 3.75C14.375 4.08152 14.2433 4.39946 14.0089 4.63388C13.7745 4.8683 13.4565 5 13.125 5ZM6.875 5C6.54348 5 6.22554 4.8683 5.99112 4.63388C5.7567 4.39946 5.625 4.08152 5.625 3.75C5.625 3.41848 5.7567 3.10054 5.99112 2.86612C6.22554 2.6317 6.54348 2.5 6.875 2.5C7.20652 2.5 7.52446 2.6317 7.75888 2.86612C7.9933 3.10054 8.125 3.41848 8.125 3.75C8.125 4.08152 7.9933 4.39946 7.75888 4.63388C7.52446 4.8683 7.20652 5 6.875 5ZM13.125 11.25C12.7935 11.25 12.4755 11.1183 12.2411 10.8839C12.0067 10.6495 11.875 10.3315 11.875 10C11.875 9.66848 12.0067 9.35054 12.2411 9.11612C12.4755 8.8817 12.7935 8.75 13.125 8.75C13.4565 8.75 13.7745 8.8817 14.0089 9.11612C14.2433 9.35054 14.375 9.66848 14.375 10C14.375 10.3315 14.2433 10.6495 14.0089 10.8839C13.7745 11.1183 13.4565 11.25 13.125 11.25ZM6.875 11.25C6.54348 11.25 6.22554 11.1183 5.99112 10.8839C5.7567 10.6495 5.625 10.3315 5.625 10C5.625 9.66848 5.7567 9.35054 5.99112 9.11612C6.22554 8.8817 6.54348 8.75 6.875 8.75C7.20652 8.75 7.52446 8.8817 7.75888 9.11612C7.9933 9.35054 8.125 9.66848 8.125 10C8.125 10.3315 7.9933 10.6495 7.75888 10.8839C7.52446 11.1183 7.20652 11.25 6.875 11.25ZM13.125 17.5C12.7935 17.5 12.4755 17.3683 12.2411 17.1339C12.0067 16.8995 11.875 16.5815 11.875 16.25C11.875 15.9185 12.0067 15.6005 12.2411 15.3661C12.4755 15.1317 12.7935 15 13.125 15C13.4565 15 13.7745 15.1317 14.0089 15.3661C14.2433 15.6005 14.375 15.9185 14.375 16.25C14.375 16.5815 14.2433 16.8995 14.0089 17.1339C13.7745 17.3683 13.4565 17.5 13.125 17.5ZM6.875 17.5C6.54348 17.5 6.22554 17.3683 5.99112 17.1339C5.7567 16.8995 5.625 16.5815 5.625 16.25C5.625 15.9185 5.7567 15.6005 5.99112 15.3661C6.22554 15.1317 6.54348 15 6.875 15C7.20652 15 7.52446 15.1317 7.75888 15.3661C7.9933 15.6005 8.125 15.9185 8.125 16.25C8.125 16.5815 7.9933 16.8995 7.75888 17.1339C7.52446 17.3683 7.20652 17.5 6.875 17.5Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");width:1px;margin:0 10px 0 0}.icon-delete{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22Icon%2FDelete%22%3E%0D%3Cpath id%3D%22Remove all%22 d%3D%22M9.5835 1.96973C10.9439 1.96973 12.0528 3.09413 12.1036 4.50119L12.1054 4.60217H15.2853C15.588 4.60217 15.8335 4.85838 15.8335 5.17444C15.8335 5.47074 15.6178 5.71444 15.3413 5.74375L15.2853 5.7467H14.8067L14.0597 16.0795C13.9864 17.0944 13.176 17.8788 12.201 17.8788H6.966C5.99094 17.8788 5.18064 17.0944 5.10725 16.0795L4.35981 5.7467H3.88174C3.59788 5.7467 3.3644 5.52152 3.33633 5.23295L3.3335 5.17444C3.3335 4.87813 3.54923 4.63443 3.82569 4.60512L3.88174 4.60217H7.06157C7.06157 3.14831 8.19067 1.96973 9.5835 1.96973ZM13.7072 5.7467L5.45977 5.7467L6.20064 15.9934C6.23085 16.4113 6.56451 16.7343 6.966 16.7343H12.201C12.6025 16.7343 12.9361 16.4113 12.9664 15.9934L13.7072 5.7467ZM11.0089 8.15024C11.2928 8.15024 11.5263 8.37542 11.5543 8.66399L11.5572 8.72251V13.7585C11.5572 14.0745 11.3117 14.3307 11.0089 14.3307C10.7251 14.3307 10.4916 14.1056 10.4635 13.817L10.4607 13.7585L10.4607 8.72251C10.4607 8.40645 10.7061 8.15024 11.0089 8.15024ZM8.15806 8.15024C8.44192 8.15024 8.6754 8.37542 8.70347 8.66399L8.7063 8.72251L8.7063 13.7585C8.7063 14.0745 8.46084 14.3307 8.15806 14.3307C7.87419 14.3307 7.64072 14.1056 7.61264 13.817L7.60981 13.7585L7.60981 8.72251C7.60981 8.40645 7.85527 8.15024 8.15806 8.15024ZM9.5835 3.11427C8.82339 3.11427 8.20225 3.73527 8.16031 4.51773L8.15806 4.60217L11.0089 4.60217C11.0089 3.78042 10.3707 3.11427 9.5835 3.11427Z%22 fill%3D%22%23737480%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-arrow-right{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-right%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-vertical-divider{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%221%22 height%3D%2218%22 viewBox%3D%220 0 1 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cline x1%3D%220.5%22 y1%3D%222.18557e-08%22 x2%3D%220.499999%22 y2%3D%2218%22 stroke%3D%22%23333333%22%2F%3E%0D%3C%2Fsvg%3E%0D\");height:20px}.line-item:hover{background-color:#d6d6d680}\n"] });
|
|
2902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssociatedLineRowComponent, decorators: [{
|
|
2903
|
+
type: Component,
|
|
2904
|
+
args: [{ selector: "app-associated-line-row", template: "<div class=\"line-item\">\r\n <div class=\"line-informations\">\r\n <div class=\"line-drag\">\r\n <i class=\"app-icon icon-dragger-vertical\"></i>\r\n </div>\r\n <div class=\"line-label\">Button Position {{ line.position }}</div>\r\n <div class=\"line-sep flex-box\">\r\n <div class=\"app-icon icon-vertical-divider\"></div>\r\n <div class=\"line-dn-box\">Line {{line?.directoryNumber?.directoryNumber}}</div>\r\n </div>\r\n <div class=\"line-name\">{{ line.displayLabel }}</div>\r\n </div>\r\n <div class=\"line-actions\">\r\n <div class=\"line-delete\">\r\n <i class=\"app-icon icon-delete\" (click)=\"onLineRemove()\"></i>\r\n </div>\r\n <div class=\"line-toggle-details\" (click)=\"onToggleDetails()\">\r\n <i class=\"app-icon icon-arrow-right\"></i>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".line-item{position:relative;display:flex;align-items:center;justify-content:space-between;background-color:#fff;border-radius:.5rem;border:1px solid #cfcfcf;padding:1rem;margin:1rem 0 0;z-index:10}.line-informations,.line-actions{display:inherit;align-items:inherit;gap:.5rem;padding:0 .5rem}.line-actions{cursor:pointer}.line-drag,.line-toggle-details,.line-delete{display:inherit;align-items:inherit;justify-content:center;font-size:1rem;color:#969696;width:36px;height:36px;border-radius:50%;transition:all .25s ease-out}.line-delete :hover{color:red!important}.line-drag{cursor:grab}.line-label{margin-right:2.5rem}.flex-box{display:flex;justify-content:flex-start}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.toggled{transform:rotate(-90deg)}.line-dn-box{line-height:20px}.icon-dragger-vertical{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cpath d%3D%22M13.125 5C12.7935 5 12.4755 4.8683 12.2411 4.63388C12.0067 4.39946 11.875 4.08152 11.875 3.75C11.875 3.41848 12.0067 3.10054 12.2411 2.86612C12.4755 2.6317 12.7935 2.5 13.125 2.5C13.4565 2.5 13.7745 2.6317 14.0089 2.86612C14.2433 3.10054 14.375 3.41848 14.375 3.75C14.375 4.08152 14.2433 4.39946 14.0089 4.63388C13.7745 4.8683 13.4565 5 13.125 5ZM6.875 5C6.54348 5 6.22554 4.8683 5.99112 4.63388C5.7567 4.39946 5.625 4.08152 5.625 3.75C5.625 3.41848 5.7567 3.10054 5.99112 2.86612C6.22554 2.6317 6.54348 2.5 6.875 2.5C7.20652 2.5 7.52446 2.6317 7.75888 2.86612C7.9933 3.10054 8.125 3.41848 8.125 3.75C8.125 4.08152 7.9933 4.39946 7.75888 4.63388C7.52446 4.8683 7.20652 5 6.875 5ZM13.125 11.25C12.7935 11.25 12.4755 11.1183 12.2411 10.8839C12.0067 10.6495 11.875 10.3315 11.875 10C11.875 9.66848 12.0067 9.35054 12.2411 9.11612C12.4755 8.8817 12.7935 8.75 13.125 8.75C13.4565 8.75 13.7745 8.8817 14.0089 9.11612C14.2433 9.35054 14.375 9.66848 14.375 10C14.375 10.3315 14.2433 10.6495 14.0089 10.8839C13.7745 11.1183 13.4565 11.25 13.125 11.25ZM6.875 11.25C6.54348 11.25 6.22554 11.1183 5.99112 10.8839C5.7567 10.6495 5.625 10.3315 5.625 10C5.625 9.66848 5.7567 9.35054 5.99112 9.11612C6.22554 8.8817 6.54348 8.75 6.875 8.75C7.20652 8.75 7.52446 8.8817 7.75888 9.11612C7.9933 9.35054 8.125 9.66848 8.125 10C8.125 10.3315 7.9933 10.6495 7.75888 10.8839C7.52446 11.1183 7.20652 11.25 6.875 11.25ZM13.125 17.5C12.7935 17.5 12.4755 17.3683 12.2411 17.1339C12.0067 16.8995 11.875 16.5815 11.875 16.25C11.875 15.9185 12.0067 15.6005 12.2411 15.3661C12.4755 15.1317 12.7935 15 13.125 15C13.4565 15 13.7745 15.1317 14.0089 15.3661C14.2433 15.6005 14.375 15.9185 14.375 16.25C14.375 16.5815 14.2433 16.8995 14.0089 17.1339C13.7745 17.3683 13.4565 17.5 13.125 17.5ZM6.875 17.5C6.54348 17.5 6.22554 17.3683 5.99112 17.1339C5.7567 16.8995 5.625 16.5815 5.625 16.25C5.625 15.9185 5.7567 15.6005 5.99112 15.3661C6.22554 15.1317 6.54348 15 6.875 15C7.20652 15 7.52446 15.1317 7.75888 15.3661C7.9933 15.6005 8.125 15.9185 8.125 16.25C8.125 16.5815 7.9933 16.8995 7.75888 17.1339C7.52446 17.3683 7.20652 17.5 6.875 17.5Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fsvg%3E%0D\");width:1px;margin:0 10px 0 0}.icon-delete{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22Icon%2FDelete%22%3E%0D%3Cpath id%3D%22Remove all%22 d%3D%22M9.5835 1.96973C10.9439 1.96973 12.0528 3.09413 12.1036 4.50119L12.1054 4.60217H15.2853C15.588 4.60217 15.8335 4.85838 15.8335 5.17444C15.8335 5.47074 15.6178 5.71444 15.3413 5.74375L15.2853 5.7467H14.8067L14.0597 16.0795C13.9864 17.0944 13.176 17.8788 12.201 17.8788H6.966C5.99094 17.8788 5.18064 17.0944 5.10725 16.0795L4.35981 5.7467H3.88174C3.59788 5.7467 3.3644 5.52152 3.33633 5.23295L3.3335 5.17444C3.3335 4.87813 3.54923 4.63443 3.82569 4.60512L3.88174 4.60217H7.06157C7.06157 3.14831 8.19067 1.96973 9.5835 1.96973ZM13.7072 5.7467L5.45977 5.7467L6.20064 15.9934C6.23085 16.4113 6.56451 16.7343 6.966 16.7343H12.201C12.6025 16.7343 12.9361 16.4113 12.9664 15.9934L13.7072 5.7467ZM11.0089 8.15024C11.2928 8.15024 11.5263 8.37542 11.5543 8.66399L11.5572 8.72251V13.7585C11.5572 14.0745 11.3117 14.3307 11.0089 14.3307C10.7251 14.3307 10.4916 14.1056 10.4635 13.817L10.4607 13.7585L10.4607 8.72251C10.4607 8.40645 10.7061 8.15024 11.0089 8.15024ZM8.15806 8.15024C8.44192 8.15024 8.6754 8.37542 8.70347 8.66399L8.7063 8.72251L8.7063 13.7585C8.7063 14.0745 8.46084 14.3307 8.15806 14.3307C7.87419 14.3307 7.64072 14.1056 7.61264 13.817L7.60981 13.7585L7.60981 8.72251C7.60981 8.40645 7.85527 8.15024 8.15806 8.15024ZM9.5835 3.11427C8.82339 3.11427 8.20225 3.73527 8.16031 4.51773L8.15806 4.60217L11.0089 4.60217C11.0089 3.78042 10.3707 3.11427 9.5835 3.11427Z%22 fill%3D%22%23737480%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-arrow-right{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-right%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-vertical-divider{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%221%22 height%3D%2218%22 viewBox%3D%220 0 1 18%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cline x1%3D%220.5%22 y1%3D%222.18557e-08%22 x2%3D%220.499999%22 y2%3D%2218%22 stroke%3D%22%23333333%22%2F%3E%0D%3C%2Fsvg%3E%0D\");height:20px}.line-item:hover{background-color:#d6d6d680}\n"] }]
|
|
2905
|
+
}], ctorParameters: function () { return []; }, propDecorators: { line: [{
|
|
2906
|
+
type: Input
|
|
2907
|
+
}], toggled: [{
|
|
2908
|
+
type: Input
|
|
2909
|
+
}], toggleAssociatedLine: [{
|
|
2910
|
+
type: Output
|
|
2911
|
+
}], removeAssociatedLine: [{
|
|
2912
|
+
type: Output
|
|
2913
|
+
}] } });
|
|
2914
|
+
|
|
2915
|
+
class DeviceManageWidgetComponent {
|
|
2916
|
+
get form() {
|
|
2917
|
+
return this.device?.form;
|
|
2918
|
+
}
|
|
2919
|
+
get lineAssociations() {
|
|
2920
|
+
return this.device?.lineAssociations;
|
|
2921
|
+
}
|
|
2922
|
+
get device() {
|
|
2923
|
+
// @ts-ignore
|
|
2924
|
+
return this.deviceIndex !== undefined && this.deviceIndex > -1 ? this.userService.user.devices[this.deviceIndex] : null;
|
|
2925
|
+
}
|
|
2926
|
+
get originDevice() {
|
|
2927
|
+
// @ts-ignore
|
|
2928
|
+
return this.deviceIndex !== undefined && this.deviceIndex > -1 ? this.userService?.originUser.devices[this.deviceIndex] : null;
|
|
2929
|
+
}
|
|
2930
|
+
get userToken() {
|
|
2931
|
+
return this.userService.user?.token;
|
|
2932
|
+
}
|
|
2933
|
+
get user() {
|
|
2934
|
+
return this.userService.user;
|
|
2935
|
+
}
|
|
2936
|
+
get hasDeviceUnsavedChanges() {
|
|
2937
|
+
return this.deviceService.hasUnsavedChanges(this.device, this.originDevice);
|
|
2938
|
+
}
|
|
2939
|
+
constructor(userService, deviceService, apiService, lineService, siteSettingsService, validationService, dialog) {
|
|
2940
|
+
this.userService = userService;
|
|
2941
|
+
this.deviceService = deviceService;
|
|
2942
|
+
this.apiService = apiService;
|
|
2943
|
+
this.lineService = lineService;
|
|
2944
|
+
this.siteSettingsService = siteSettingsService;
|
|
2945
|
+
this.validationService = validationService;
|
|
2946
|
+
this.dialog = dialog;
|
|
2947
|
+
this.onSave = new EventEmitter();
|
|
2948
|
+
this.onChange = new EventEmitter();
|
|
2949
|
+
this.discardChanges = new EventEmitter();
|
|
2950
|
+
this.goBack = new EventEmitter();
|
|
2951
|
+
this.tabIndex = 0;
|
|
2952
|
+
this.tabInit = false;
|
|
2953
|
+
}
|
|
2954
|
+
ngOnInit() {
|
|
2955
|
+
this.apiService.token = this.token;
|
|
2956
|
+
this.apiService.apiUrl = this.host;
|
|
2957
|
+
console.log('this.apiService.apiUrl = ', this.apiService.apiUrl);
|
|
2958
|
+
// this.setData(true);
|
|
2959
|
+
this.getData();
|
|
2960
|
+
this.userService.onFetchUserToken$
|
|
2961
|
+
.subscribe(() => {
|
|
2962
|
+
this.setData();
|
|
2963
|
+
});
|
|
2964
|
+
}
|
|
2965
|
+
ngAfterViewInit() {
|
|
2966
|
+
console.log('TABS = ', this.tabs);
|
|
2967
|
+
if (this.tabs && !this.tabInit) {
|
|
2968
|
+
const handleTabClick = this.tabs._handleClick;
|
|
2969
|
+
this.tabInit = true;
|
|
2970
|
+
// 2. Replace the click handler with our custom function
|
|
2971
|
+
this.tabs._handleClick = (tab, header, index) => {
|
|
2972
|
+
// 3. Implement your conditional logic in canDeactivateTab()
|
|
2973
|
+
// (return the boolean here)
|
|
2974
|
+
if (this.hasDeviceUnsavedChanges) {
|
|
2975
|
+
this.openUnsavedChangesDialog(TOGGLE_TYPES.TABS, { handleTabClick, tab, header, index });
|
|
2976
|
+
// 4. If the tab *should* be changed, call the 'old' click handler
|
|
2977
|
+
// handleTabClick.apply(this.tabs, [tab, header, index]);
|
|
2978
|
+
}
|
|
2979
|
+
else {
|
|
2980
|
+
handleTabClick.apply(this.tabs, [tab, header, index]);
|
|
2981
|
+
this.tabIndex = index;
|
|
2982
|
+
}
|
|
2983
|
+
};
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
ngOnDestroy() {
|
|
2987
|
+
}
|
|
2988
|
+
onGoBack() {
|
|
2989
|
+
this.goBack.emit();
|
|
2990
|
+
}
|
|
2991
|
+
toggleAssociatedLine(lineIndex, lineAssociation) {
|
|
2992
|
+
if (!this.lineService.currentActiveLinePkid) {
|
|
2993
|
+
lineAssociation.active = true;
|
|
2994
|
+
this.lineService.currentActiveLinePkid = lineAssociation.linePkid;
|
|
2995
|
+
return;
|
|
2996
|
+
}
|
|
2997
|
+
if (!lineAssociation.hasChanges && lineAssociation.active) {
|
|
2998
|
+
lineAssociation.active = false;
|
|
2999
|
+
this.lineService.currentActiveLinePkid = null;
|
|
3000
|
+
return;
|
|
3001
|
+
}
|
|
3002
|
+
if (this.device.lineAssociationsHasChanges) {
|
|
3003
|
+
this.openUnsavedChangesDialog(TOGGLE_TYPES.ASSOCIATED_LINE_ONLY);
|
|
3004
|
+
}
|
|
3005
|
+
else {
|
|
3006
|
+
this.setLineActive(lineIndex);
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
openUnsavedChangesDialog(toggleType, handleTabClick) {
|
|
3010
|
+
const dialogRef = this.dialog.open(InfoDialogComponent, {
|
|
3011
|
+
data: {
|
|
3012
|
+
title: 'Discard unsaved edits?',
|
|
3013
|
+
message: 'You\'re about to leave this page and discard all unsaved app edits',
|
|
3014
|
+
confirmButtonText: 'Discard'
|
|
3015
|
+
}
|
|
3016
|
+
});
|
|
3017
|
+
dialogRef.beforeClosed().subscribe(result => {
|
|
3018
|
+
if (result) {
|
|
3019
|
+
switch (toggleType) {
|
|
3020
|
+
case TOGGLE_TYPES.TABS:
|
|
3021
|
+
this.resetByTabToggle(handleTabClick);
|
|
3022
|
+
break;
|
|
3023
|
+
case TOGGLE_TYPES.ASSOCIATED_LINE_ONLY:
|
|
3024
|
+
this.resetLine(handleTabClick);
|
|
3025
|
+
break;
|
|
3026
|
+
}
|
|
3027
|
+
this.tabIndex = handleTabClick.index;
|
|
3028
|
+
}
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3031
|
+
resetByTabToggle(handleTabClick) {
|
|
3032
|
+
switch (this.tabIndex) {
|
|
3033
|
+
case 0:
|
|
3034
|
+
this.userService.resetDevice(this.device, this.validationService);
|
|
3035
|
+
break;
|
|
3036
|
+
case 1:
|
|
3037
|
+
this.resetLine();
|
|
3038
|
+
break;
|
|
3039
|
+
}
|
|
3040
|
+
this.discardChanges.emit();
|
|
3041
|
+
if (handleTabClick) {
|
|
3042
|
+
handleTabClick.handleTabClick.apply(this.tabs, [handleTabClick.tab, handleTabClick.header, handleTabClick.index]);
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
resetLine(lineIndex, handleTabClick) {
|
|
3046
|
+
const lineIndToReset = this.lineAssociations.findIndex(line => line.active && line.hasChanges);
|
|
3047
|
+
if (lineIndToReset > -1) {
|
|
3048
|
+
this.resetAssociatedLine(lineIndToReset);
|
|
3049
|
+
}
|
|
3050
|
+
if (lineIndex !== undefined && lineIndex > -1) {
|
|
3051
|
+
this.setLineActive(lineIndex);
|
|
3052
|
+
}
|
|
3053
|
+
this.discardChanges.emit();
|
|
3054
|
+
if (handleTabClick) {
|
|
3055
|
+
handleTabClick.handleTabClick.apply(this.tabs, [handleTabClick.tab, handleTabClick.header, handleTabClick.index]);
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
onRemoveLine(lineIndex) {
|
|
3059
|
+
if (!this.lineAssociations || !this.lineAssociations[lineIndex]) {
|
|
3060
|
+
return;
|
|
3061
|
+
}
|
|
3062
|
+
const dialogRef = this.dialog.open(InfoDialogComponent, {
|
|
3063
|
+
data: {
|
|
3064
|
+
title: 'Remove device associated line?',
|
|
3065
|
+
message: `You\'re sure that you want to delete ${this.lineAssociations[lineIndex].directoryNumber?.directoryNumber} associated line`,
|
|
3066
|
+
confirmButtonText: 'Delete Line'
|
|
3067
|
+
}
|
|
3068
|
+
});
|
|
3069
|
+
dialogRef.beforeClosed().subscribe(result => {
|
|
3070
|
+
if (result) {
|
|
3071
|
+
this.dataPending = true;
|
|
3072
|
+
this.deleteLine(this.lineAssociations[lineIndex]);
|
|
3073
|
+
}
|
|
3074
|
+
});
|
|
3075
|
+
}
|
|
3076
|
+
resetAssociatedLine(lineIndex) {
|
|
3077
|
+
if (this.userService.user?.devices?.length) {
|
|
3078
|
+
const deviceInd = this.userService.user?.devices.findIndex((device) => device.name === this.device.name);
|
|
3079
|
+
if (deviceInd > -1) {
|
|
3080
|
+
this.userService.resetLineAssociation(deviceInd, lineIndex, this.validationService);
|
|
3081
|
+
this.userService.user.devices[this.deviceIndex].lineAssociationsHasChanges = false;
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
setLineActive(index) {
|
|
3086
|
+
if (this.lineAssociations?.length) {
|
|
3087
|
+
this.device.lineAssociations.forEach(line => line.active = false);
|
|
3088
|
+
}
|
|
3089
|
+
if (this.lineAssociations[index]) {
|
|
3090
|
+
this.lineService.currentActiveLinePkid = this.device.lineAssociations[index].linePkid;
|
|
3091
|
+
this.device.lineAssociations[index].active = true;
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
onDeviceSave() {
|
|
3095
|
+
switch (this.tabIndex) {
|
|
3096
|
+
case DeviceViewType.INFO:
|
|
3097
|
+
this.updateDevice(this.siteId, this.device?.name, this.userToken);
|
|
3098
|
+
break;
|
|
3099
|
+
case DeviceViewType.LINES:
|
|
3100
|
+
this.onUpdateLine();
|
|
3101
|
+
break;
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
save() {
|
|
3105
|
+
this.onDeviceSave();
|
|
3106
|
+
}
|
|
3107
|
+
onUpdateDevice() {
|
|
3108
|
+
this.updateDevice(this.siteId, this.device?.name, this.userToken);
|
|
3109
|
+
}
|
|
3110
|
+
onUpdateLine() {
|
|
3111
|
+
this.lineService.onSaveLineAssociationEvent.next(true);
|
|
3112
|
+
}
|
|
3113
|
+
afterLineUpdate() {
|
|
3114
|
+
this.onSave.emit('associated line is updated');
|
|
3115
|
+
}
|
|
3116
|
+
updateDevice(siteId, deviceName, token) {
|
|
3117
|
+
if (this.deviceService.hasUnsavedChanges(this.device, this.originDevice) && !this.dataPending) {
|
|
3118
|
+
this.dataPending = true;
|
|
3119
|
+
const calls = [];
|
|
3120
|
+
if (this.deviceService.hasDeviceInfoUnsavedChanges(this.device, this.originDevice)) {
|
|
3121
|
+
const body = this.deviceService.getDataToUpdateDevice(this.device, this.originDevice);
|
|
3122
|
+
calls.push(this.deviceService.putDeviceFields(siteId, deviceName, token, body));
|
|
3123
|
+
}
|
|
3124
|
+
if (calls?.length) {
|
|
3125
|
+
forkJoin(calls).subscribe((results) => {
|
|
3126
|
+
this.userService.persistUserCache()
|
|
3127
|
+
.subscribe(() => {
|
|
3128
|
+
this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
|
|
3129
|
+
.subscribe(() => {
|
|
3130
|
+
this.dataPending = false;
|
|
3131
|
+
this.onSave.emit('device updated');
|
|
3132
|
+
}, () => this.dataPending = false);
|
|
3133
|
+
});
|
|
3134
|
+
}, () => this.dataPending = false);
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
onChangeField(token) {
|
|
3139
|
+
if (!token) {
|
|
3140
|
+
return;
|
|
3141
|
+
}
|
|
3142
|
+
if (this.device) {
|
|
3143
|
+
this.userService.user.devices[this.deviceIndex][token] = this.form?.get(token)?.value;
|
|
3144
|
+
this.onChange.emit();
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
getData() {
|
|
3148
|
+
this.dataPending = true;
|
|
3149
|
+
forkJoin([
|
|
3150
|
+
this.userService.fetchUserToken(this.siteId, this.userId, this.validationService),
|
|
3151
|
+
this.siteSettingsService.getDeviceSoftkeyTemplates(this.siteId),
|
|
3152
|
+
this.siteSettingsService.getSiteDefaults(this.siteId)
|
|
3153
|
+
]).subscribe(() => {
|
|
3154
|
+
console.log('device widget user', this.user);
|
|
3155
|
+
if (this.originDevice?.callingSearchSpaceName && this.siteSettingsService?.siteDefaults?.cssFilter) {
|
|
3156
|
+
this.siteSettingsService.siteDefaults.cssFilter.push(this.originDevice.callingSearchSpaceName);
|
|
3157
|
+
}
|
|
3158
|
+
this.setData();
|
|
3159
|
+
this.ngAfterViewInit();
|
|
3160
|
+
this.dataPending = false;
|
|
3161
|
+
}, () => this.dataPending = false);
|
|
3162
|
+
}
|
|
3163
|
+
setCookie(name, value, days) {
|
|
3164
|
+
var expires = "";
|
|
3165
|
+
if (days) {
|
|
3166
|
+
var date = new Date();
|
|
3167
|
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
3168
|
+
expires = "; expires=" + date.toUTCString();
|
|
3169
|
+
}
|
|
3170
|
+
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
|
3171
|
+
}
|
|
3172
|
+
setData(isInit) {
|
|
3173
|
+
/*if (isInit) {
|
|
3174
|
+
this.userService.user = new SimplifiedUser(JSON.parse(JSON.stringify(this.user.getFullData())), this.validationService);
|
|
3175
|
+
this.userService.originUser = new SimplifiedUser(JSON.parse(JSON.stringify(this.user.getFullData())), this.validationService);
|
|
3176
|
+
}*/
|
|
3177
|
+
if (this.deviceName && this.userService.user?.devices?.length) {
|
|
3178
|
+
this.deviceIndex = this.userService.user.devices.findIndex((device) => device.name === this.deviceName);
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
deleteLine(line) {
|
|
3182
|
+
this.lineService.deleteLine(this.siteId, line.linePkid, this.userService.user.token)
|
|
3183
|
+
.subscribe(() => {
|
|
3184
|
+
this.userService.persistUserCache()
|
|
3185
|
+
.subscribe(() => {
|
|
3186
|
+
this.userService.fetchUserToken(this.siteId, this.userService.user.userid, this.validationService)
|
|
3187
|
+
.subscribe(() => {
|
|
3188
|
+
// this.updatedLineAssociationEvent.emit();
|
|
3189
|
+
this.dataPending = false;
|
|
3190
|
+
});
|
|
3191
|
+
});
|
|
3192
|
+
});
|
|
3193
|
+
}
|
|
3194
|
+
}
|
|
3195
|
+
DeviceManageWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceManageWidgetComponent, deps: [{ token: UserService }, { token: DeviceService }, { token: APIService }, { token: LineService }, { token: SiteSettingsService }, { token: ValidationService }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
3196
|
+
DeviceManageWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceManageWidgetComponent, selector: "app-device-manage-widget", inputs: { token: "token", host: "host", siteId: "siteId", userId: "userId", isLdap: "isLdap", deviceName: "deviceName" }, outputs: { onSave: "onSave", onChange: "onChange", discardChanges: "discardChanges", goBack: "goBack" }, viewQueries: [{ propertyName: "tabs", first: true, predicate: ["tabs"], descendants: true }], ngImport: i0, template: "<app-loader *ngIf=\"dataPending || deviceService.dataPending\"></app-loader>\r\n<div id=\"device-manage-widget\">\r\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\r\n <div class=\"go-back-box-container\">\r\n <span class=\"app-icon icon-webex-left-arrow\"></span>\r\n <span class=\"go-back-title\">User Devices</span>\r\n </div>\r\n </div>\r\n <mat-tab-group #tabs animationDuration=\"0\" mat-align-tabs=\"start\"\r\n class=\"content-box\">\r\n <mat-tab label=\"Device\">\r\n <div *ngIf=\"user\">\r\n <ng-container *ngTemplateOutlet=\"editDevice\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n <mat-tab label=\"Associated Lines\">\r\n <ng-container *ngIf=\"user\">\r\n <div *ngFor=\"let lineAssociation of lineAssociations, let i = index\">\r\n <app-associated-line-row\r\n [line]=\"lineAssociation\"\r\n (removeAssociatedLine)=\"onRemoveLine(i)\"\r\n (toggleAssociatedLine)=\"toggleAssociatedLine(i, lineAssociation)\"></app-associated-line-row>\r\n <app-device-associated-line *ngIf=\"lineAssociation.active\"\r\n [deviceIndex]=\"deviceIndex\"\r\n [deviceName]=\"deviceName\"\r\n [siteId]=\"siteId\"\r\n (onChange)=\"onChange.emit()\"\r\n (updatedLineAssociationEvent)=\"afterLineUpdate()\"\r\n [lineIndex]=\"i\"></app-device-associated-line>\r\n </div>\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab ></mat-tab>\r\n <mat-tab ></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #editDevice>\r\n <form *ngIf=\"device && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <div class=\"user-info-box user-details-box__info\">\r\n <h3 class=\"user-box-title\">Details</h3>\r\n <div class=\"form-holder__blocks\">\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">{{user?.firstName}} {{user?.lastName}}</div>\r\n <div class=\"user-box-block-item__tag\">Name</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">Cisco dual mode for andorid</div>\r\n <div class=\"user-box-block-item__tag\">Type</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">David Alexander 1545545154554</div>\r\n <div class=\"user-box-block-item__tag\">Device Description</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">1545415455545 | 5545544485454 | 998989454</div>\r\n <div class=\"user-box-block-item__tag\">Line</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">PLAR Service</div>\r\n <mat-slide-toggle name=\"plarService\" formControlName=\"plarService\"></mat-slide-toggle>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- DEVICE INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Device Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Registration Status</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.registrationStatus}}</span>\r\n <!--<mat-form-field appearance=\"outline\">\r\n <input formControlName=\"registrationStatus\"\r\n matInput (input)=\"onChangeField('registrationStatus')\">\r\n </mat-form-field>-->\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">IP Address</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.ipAddress}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Description</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"description\"\r\n matInput (input)=\"onChangeField('description')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Protocol</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.protocol}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Softkey Template</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"softkeyTemplate\"\r\n (selectionChange)=\"onChangeField('softkeyTemplate')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.deviceSoftkeyTemplates\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('softkeyTemplate')?.hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Button Template</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.buttonTemplate}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Location</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.location}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Device Pool</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"devicePoolName\"\r\n (selectionChange)=\"onChangeField('devicePoolName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.devicePools\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('devicePoolName')?.hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Device CSS</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"callingSearchSpaceName\"\r\n (selectionChange)=\"onChangeField('callingSearchSpaceName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.callingSearchSpaceTypes\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('callingSearchSpaceName')?.hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Firmware version</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.firmwareVersion}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-right%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-left%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;margin:0 0 30px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i9.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: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i9.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i10.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i11.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: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i14.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i14.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: AppLoaderComponent, selector: "app-loader" }, { kind: "component", type: DeviceAssociatedLineComponent, selector: "app-device-associated-line", inputs: ["lineIndex", "deviceIndex", "deviceName", "siteId"], outputs: ["updatedLineAssociationEvent", "onChange"] }, { kind: "component", type: AssociatedLineRowComponent, selector: "app-associated-line-row", inputs: ["line", "toggled"], outputs: ["toggleAssociatedLine", "removeAssociatedLine"] }] });
|
|
3197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceManageWidgetComponent, decorators: [{
|
|
3198
|
+
type: Component,
|
|
3199
|
+
args: [{ selector: 'app-device-manage-widget', template: "<app-loader *ngIf=\"dataPending || deviceService.dataPending\"></app-loader>\r\n<div id=\"device-manage-widget\">\r\n <div class=\"go-back-box\" (click)=\"onGoBack()\">\r\n <div class=\"go-back-box-container\">\r\n <span class=\"app-icon icon-webex-left-arrow\"></span>\r\n <span class=\"go-back-title\">User Devices</span>\r\n </div>\r\n </div>\r\n <mat-tab-group #tabs animationDuration=\"0\" mat-align-tabs=\"start\"\r\n class=\"content-box\">\r\n <mat-tab label=\"Device\">\r\n <div *ngIf=\"user\">\r\n <ng-container *ngTemplateOutlet=\"editDevice\">\r\n </ng-container>\r\n </div>\r\n </mat-tab>\r\n <mat-tab label=\"Associated Lines\">\r\n <ng-container *ngIf=\"user\">\r\n <div *ngFor=\"let lineAssociation of lineAssociations, let i = index\">\r\n <app-associated-line-row\r\n [line]=\"lineAssociation\"\r\n (removeAssociatedLine)=\"onRemoveLine(i)\"\r\n (toggleAssociatedLine)=\"toggleAssociatedLine(i, lineAssociation)\"></app-associated-line-row>\r\n <app-device-associated-line *ngIf=\"lineAssociation.active\"\r\n [deviceIndex]=\"deviceIndex\"\r\n [deviceName]=\"deviceName\"\r\n [siteId]=\"siteId\"\r\n (onChange)=\"onChange.emit()\"\r\n (updatedLineAssociationEvent)=\"afterLineUpdate()\"\r\n [lineIndex]=\"i\"></app-device-associated-line>\r\n </div>\r\n </ng-container>\r\n </mat-tab>\r\n <mat-tab ></mat-tab>\r\n <mat-tab ></mat-tab>\r\n </mat-tab-group>\r\n\r\n <ng-template #editDevice>\r\n <form *ngIf=\"device && form\" [formGroup]=\"form\">\r\n <div class=\"info-boxes-container\">\r\n <div class=\"user-info-box user-details-box__info\">\r\n <h3 class=\"user-box-title\">Details</h3>\r\n <div class=\"form-holder__blocks\">\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">{{user?.firstName}} {{user?.lastName}}</div>\r\n <div class=\"user-box-block-item__tag\">Name</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">Cisco dual mode for andorid</div>\r\n <div class=\"user-box-block-item__tag\">Type</div>\r\n </div>\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">David Alexander 1545545154554</div>\r\n <div class=\"user-box-block-item__tag\">Device Description</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">1545415455545 | 5545544485454 | 998989454</div>\r\n <div class=\"user-box-block-item__tag\">Line</div>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"user-box-block\">\r\n <div class=\"user-box-block-item\">\r\n <div class=\"user-box-block-item__title\">PLAR Service</div>\r\n <mat-slide-toggle name=\"plarService\" formControlName=\"plarService\"></mat-slide-toggle>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- DEVICE INFO BOX-->\r\n <div class=\"user-info-box user-details-box\">\r\n <h3 class=\"user-box-title\">Device Info</h3>\r\n <div class=\"form-holder__inputs\">\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Registration Status</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.registrationStatus}}</span>\r\n <!--<mat-form-field appearance=\"outline\">\r\n <input formControlName=\"registrationStatus\"\r\n matInput (input)=\"onChangeField('registrationStatus')\">\r\n </mat-form-field>-->\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">IP Address</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.ipAddress}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Description</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <input formControlName=\"description\"\r\n matInput (input)=\"onChangeField('description')\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Protocol</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.protocol}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Softkey Template</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"softkeyTemplate\"\r\n (selectionChange)=\"onChangeField('softkeyTemplate')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.deviceSoftkeyTemplates\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('softkeyTemplate')?.hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Button Template</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.buttonTemplate}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Location</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.location}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Device Pool</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"devicePoolName\"\r\n (selectionChange)=\"onChangeField('devicePoolName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.devicePools\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('devicePoolName')?.hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Device CSS</div>\r\n <div class=\"input-holder__input\">\r\n <mat-form-field appearance=\"outline\">\r\n <mat-select formControlName=\"callingSearchSpaceName\"\r\n (selectionChange)=\"onChangeField('callingSearchSpaceName')\">\r\n <mat-option *ngFor=\"let type of siteSettingsService.callingSearchSpaceTypes\" [value]=\"type\">\r\n {{type}}\r\n </mat-option>\r\n </mat-select>\r\n <mat-error\r\n *ngIf=\"form.get('callingSearchSpaceName')?.hasError('required')\">\r\n <i class=\"fa fa-exclamation-triangle\"></i>\r\n This field is required\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div class=\"input-holder\">\r\n <div class=\"input-holder__name\">Firmware version</div>\r\n <div class=\"input-holder__input\">\r\n <span class=\"disabled-data-block\">{{device.firmwareVersion}}</span>\r\n </div>\r\n </div>\r\n <mat-divider></mat-divider>\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n\r\n </form>\r\n </ng-template>\r\n\r\n</div>\r\n\r\n\r\n\r\n\r\n\r\n", styles: ["@import\"https://fonts.googleapis.com/css?family=Poppins:400,100,200,300,500,600,800,700,900\";.fa:hover{color:#0d56aa!important}.mat-icon-button{background:transparent}.icon-webex-box{width:2rem;height:2rem;font-size:.7rem;line-height:1rem;display:inline-block;background:#d0d0d0;border-radius:2rem;line-height:40px;text-align:center}.icon-webex{filter:invert(12%) sepia(14%) saturate(4%) hue-rotate(354deg) brightness(103%) contrast(90%);background-repeat:no-repeat;background-position:center;display:inline-block;height:1rem;width:1rem}.icon-webex-user{background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22a%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 16.67 15.56%22%3E%3Cdefs%3E%3Cstyle%3E.b%7Bfill%3Anone%3Bstroke%3A%232c355d%3Bstroke-width%3A1.4px%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cpath class%3D%22b%22 d%3D%22M4.87%2C3.89c0-1.72%2C1.51-3.19%2C3.47-3.19s3.47%2C1.47%2C3.47%2C3.19-1.51%2C3.19-3.47%2C3.19-3.47-1.47-3.47-3.19ZM.7%2C12.64c0-.37%2C.19-.76%2C.67-1.17%2C.48-.41%2C1.17-.78%2C2-1.09%2C1.66-.62%2C3.66-.93%2C4.97-.93s3.31%2C.31%2C4.97%2C.93c.83%2C.31%2C1.52%2C.68%2C2%2C1.09%2C.47%2C.41%2C.67%2C.8%2C.67%2C1.17v2.22H.7v-2.22Z%22%2F%3E%3C%2Fsvg%3E\")}.icon-user-status{display:inline-block}*{margin:0}body{background:#f7f7f7}body,th,td{font-family:Poppins,Poppins,sans-serif;font-size:14px}th{color:#0000008a;text-align:left}td{box-sizing:border-box;padding:10px 5px 10px 0}.content-box{margin:auto;position:relative;width:95%}.content-box table{width:100%}.edit-icon-td{width:50px;position:relative}.edit-icon-td button{position:absolute;top:4px}.mat-progress-spinner circle,.mat-spinner circle{stroke:gray!important}.data-loader{position:absolute;top:calc(50% - 25px);left:calc(50% - 25px)}.flex-box{display:flex;justify-content:flex-start}.spinner-container{width:100%;display:flex;justify-content:center;align-items:center}.spinner-container ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#000}.user-info-box{background:white;display:grid;grid-template-columns:30% 70%;border-radius:8px;border:rgba(0,0,0,.2) 1px solid;padding:24px;font-weight:400;font-size:14px}.user-info-box h3{display:block;font-weight:500;font-size:16px}.mat-divider{margin:5px 0!important}.info-boxes-container{padding:24px 0;display:flex;flex-direction:column;gap:24px}.header-box{height:60px;width:100%;line-height:60px;background:white;border-bottom:1px solid #dedddd}.header-box .header-back-block{float:left}.header-box .header-button-block{float:right}.webex-table{width:100%;margin:auto}.webex-table tr{border-bottom:1px solid #dedede}.webex-table th{background:#f7f7f7;color:#636363;font-size:12px}.webex-table td{background:#fff;color:#636363;font-size:14px}.webex-table tr:hover td{background:#ededed;cursor:pointer}.webex-table th.mat-header-cell,.webex-table td.mat-cell,.webex-table td.mat-footer-cell{border-bottom:1px solid #dedede}.webex-table tr.mat-header-row{height:37px}.mat-form-field{padding:0 0 5px;width:93%}.mat-form-field.mat-form-field-disabled{border-bottom:none}.mat-error{color:#c73636;margin:13px 0 0}.select-box{border-radius:30px;background:#F3F6F6;border:1px solid #E2E9EF;height:35px;position:relative}.select-box select{border:none!important;background:transparent;height:100%;width:92%;margin:auto;display:block}option:focus,option:focus-visible{border:none!important;outline:none!important}option{height:30px;cursor:pointer;color:#636363}option:hover{background:#ededed!important}.mat-select{height:100%!important}.info-holder,.input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__name,.input-holder__name{font-weight:500!important;font-size:14px!important}.info-holder__inputs .input-holder,.input-holder__inputs .input-holder{display:grid;grid-template-columns:30% 70%;align-items:baseline}.info-holder__inputs .input-holder__name,.input-holder__inputs .input-holder__name{font-weight:400!important;font-size:14px!important}.mat-form-field-appearance-outline .mat-form-field-infix{padding:0!important}.mat-divider{margin:12px 0}::ng-deep .mat-form-field-wrapper{height:30px}::ng-deep .mat-form-field-flex{height:30px}::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline{height:35px}:ng-deep .mat-form-field-outline .mat-form-field-outline-thick{height:35px}::ng-deep .mat-select{line-height:20px}::ng-deep .mat-form-field-infix{border-top:0px!important}::ng-deep .mat-tab-group{font-family:Inter,sans-serif}::ng-deep .mat-tab-label{font-weight:500!important;font-size:16px!important;height:auto!important;min-width:auto!important;padding:0!important;opacity:1!important;color:#000!important}::ng-deep .mat-ink-bar{background-color:#000!important;height:3px!important}::ng-deep .mat-tab-labels{gap:30px}::ng-deep .mat-progress-spinner{position:absolute!important;top:40%;left:45%}table{border-collapse:collapse;border-spacing:0}.line-row{background:#ececec;cursor:pointer;width:100%;padding:5px;box-sizing:border-box}.line-row.disabled-line-row{cursor:default;color:silver}.user-details-box__info{grid-template-columns:100%}.form-holder__blocks{margin-top:1rem}.user-box-block{padding:1rem 0;gap:4rem;display:flex}.user-box-block-item__title{margin-bottom:.5rem}.user-box-block-item__tag{font-size:14px;color:#6d6d6d}.app-icon{height:20px;width:20px;display:inline-block;cursor:pointer;background-repeat:no-repeat;background-position:center}.app-icon{transition:all .15s ease-out}.icon-webex-right-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2220%22 height%3D%2220%22 viewBox%3D%220 0 20 20%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-right%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M14.0812 9.66902L6.58119 2.16902C6.53813 2.12351 6.48638 2.0871 6.429 2.06193C6.37162 2.03677 6.30978 2.02336 6.24713 2.0225C6.18448 2.02165 6.1223 2.03336 6.06425 2.05695C6.00621 2.08053 5.95348 2.11552 5.90919 2.15983C5.8649 2.20415 5.82994 2.25689 5.80638 2.31495C5.78282 2.373 5.77113 2.43519 5.77202 2.49784C5.77291 2.56049 5.78634 2.62232 5.81153 2.67969C5.83673 2.73705 5.87316 2.78879 5.91869 2.83183L13.0874 10.0003L5.91869 17.169C5.87316 17.2121 5.83673 17.2638 5.81153 17.3212C5.78634 17.3785 5.77291 17.4404 5.77202 17.503C5.77113 17.5657 5.78282 17.6279 5.80638 17.6859C5.82994 17.744 5.8649 17.7967 5.90919 17.841C5.95348 17.8853 6.00621 17.9203 6.06425 17.9439C6.1223 17.9675 6.18448 17.9792 6.24713 17.9783C6.30978 17.9775 6.37162 17.9641 6.429 17.9389C6.48638 17.9138 6.53813 17.8773 6.58119 17.8318L14.0812 10.3318C14.1691 10.2439 14.2184 10.1247 14.2184 10.0004C14.2184 9.87613 14.1691 9.75692 14.0812 9.66902Z%22 fill%3D%22%230F0F0F%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.icon-webex-left-arrow{background-image:url(\"data:image/svg+xml,%3Csvg width%3D%2216%22 height%3D%2216%22 viewBox%3D%220 0 16 16%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0D%3Cg id%3D%22arrow-left%22%3E%0D%3Cpath id%3D%22Vector%22 d%3D%22M5.70746 7.99987L11.3539 2.35352C11.4453 2.25928 11.496 2.13287 11.495 2.00159C11.494 1.8703 11.4414 1.74467 11.3486 1.65183C11.2558 1.55899 11.1301 1.50639 10.9988 1.50539C10.8676 1.50438 10.7411 1.55506 10.6469 1.64647L4.64691 7.64647C4.55316 7.74023 4.50049 7.8674 4.50049 7.99999C4.50049 8.13259 4.55316 8.25975 4.64691 8.35352L10.6469 14.3535C10.6931 14.4011 10.7482 14.439 10.8092 14.4651C10.8702 14.4912 10.9357 14.5049 11.002 14.5054C11.0683 14.5059 11.134 14.4932 11.1954 14.468C11.2567 14.4429 11.3125 14.4058 11.3593 14.3589C11.4062 14.312 11.4433 14.2563 11.4685 14.1949C11.4936 14.1336 11.5063 14.0679 11.5058 14.0016C11.5053 13.9353 11.4916 13.8697 11.4655 13.8088C11.4394 13.7478 11.4015 13.6926 11.3539 13.6465L5.70746 7.99987Z%22 fill%3D%22black%22 fill-opacity%3D%220.95%22%2F%3E%0D%3C%2Fg%3E%0D%3C%2Fsvg%3E%0D\")}.go-back-box{background:white;border-bottom:rgba(0,0,0,.2) 1px solid;height:60px;width:100%;line-height:60px;margin:0 0 30px;cursor:pointer}.go-back-box-container{width:95%;margin:auto;display:flex;justify-content:flex-start}.go-back-box-container .icon-webex-left-arrow,.go-back-box-container .go-back-title{display:block;height:60px}.go-back-box-container .go-back-title{line-height:61px}.go-back-title{display:inline-block;margin:0 10px}\n"] }]
|
|
3200
|
+
}], ctorParameters: function () { return [{ type: UserService }, { type: DeviceService }, { type: APIService }, { type: LineService }, { type: SiteSettingsService }, { type: ValidationService }, { type: i1$1.MatDialog }]; }, propDecorators: { tabs: [{
|
|
3201
|
+
type: ViewChild,
|
|
3202
|
+
args: ["tabs", { static: false }]
|
|
3203
|
+
}], onSave: [{
|
|
3204
|
+
type: Output
|
|
3205
|
+
}], onChange: [{
|
|
3206
|
+
type: Output
|
|
3207
|
+
}], discardChanges: [{
|
|
3208
|
+
type: Output
|
|
3209
|
+
}], goBack: [{
|
|
3210
|
+
type: Output
|
|
3211
|
+
}], token: [{
|
|
3212
|
+
type: Input
|
|
3213
|
+
}], host: [{
|
|
3214
|
+
type: Input
|
|
3215
|
+
}], siteId: [{
|
|
3216
|
+
type: Input
|
|
3217
|
+
}], userId: [{
|
|
3218
|
+
type: Input
|
|
3219
|
+
}], isLdap: [{
|
|
3220
|
+
type: Input
|
|
3221
|
+
}], deviceName: [{
|
|
3222
|
+
type: Input
|
|
3223
|
+
}] } });
|
|
3224
|
+
|
|
3225
|
+
class DeviceAssociatedLineExtensionComponent {
|
|
3226
|
+
get user() {
|
|
3227
|
+
return this.userService.user;
|
|
3228
|
+
}
|
|
3229
|
+
get availableNumbers() {
|
|
3230
|
+
// @ts-ignore
|
|
3231
|
+
return this.routePartition && this.dnsService.availableNumbers ? this.dnsService.availableNumbers[this.routePartition] : null;
|
|
3232
|
+
}
|
|
3233
|
+
constructor(userService, dnsService) {
|
|
3234
|
+
this.userService = userService;
|
|
3235
|
+
this.dnsService = dnsService;
|
|
3236
|
+
this.onChange = new EventEmitter();
|
|
3237
|
+
}
|
|
3238
|
+
ngOnInit() {
|
|
3239
|
+
this.getData();
|
|
3240
|
+
}
|
|
3241
|
+
onChangeField(event) {
|
|
3242
|
+
// if (!token) {
|
|
3243
|
+
// return;
|
|
3244
|
+
// }
|
|
3245
|
+
// (this.userService.user as any)[token] = this.form?.get(token)?.value;
|
|
3246
|
+
this.onChange.emit(event?.value);
|
|
3247
|
+
}
|
|
3248
|
+
getData() {
|
|
3249
|
+
if (!this.siteId || !this.routePartition) {
|
|
3250
|
+
return;
|
|
3251
|
+
}
|
|
3252
|
+
this.dataPending = true;
|
|
3253
|
+
this.dnsService.getNumberRange(String(this.siteId), this.routePartition)
|
|
3254
|
+
.subscribe(() => {
|
|
3255
|
+
if (this.availableNumbers) {
|
|
3256
|
+
// @ts-ignore
|
|
3257
|
+
this.dnsService.availableNumbers[this.routePartition].push(this.directoryNumber);
|
|
3258
|
+
}
|
|
3259
|
+
this.dataPending = false;
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
DeviceAssociatedLineExtensionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineExtensionComponent, deps: [{ token: UserService }, { token: DnsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3264
|
+
DeviceAssociatedLineExtensionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DeviceAssociatedLineExtensionComponent, selector: "app-device-associated-line-extension", inputs: { formControl: "formControl", routePartition: "routePartition", directoryNumber: "directoryNumber", siteId: "siteId" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-select [formControl]=\"formControl\" (selectionChange)=\"this.onChangeField($event)\" #page>\r\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["table{border-collapse:collapse;border-spacing:0}\n"], dependencies: [{ kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i9.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i13.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }] });
|
|
3265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DeviceAssociatedLineExtensionComponent, decorators: [{
|
|
3266
|
+
type: Component,
|
|
3267
|
+
args: [{ selector: 'app-device-associated-line-extension', template: "<div *ngIf=\"this.availableNumbers?.length\" class=\"user-calling-extension\">\r\n <mat-select [formControl]=\"formControl\" (selectionChange)=\"this.onChangeField($event)\" #page>\r\n <mat-option *ngFor=\"let option of this.availableNumbers; let i = index;\"[value]=\"option\">{{option}}</mat-option>\r\n </mat-select>\r\n <mat-spinner *ngIf=\"this.dataPending\" [diameter]=\"50\"></mat-spinner>\r\n</div>\r\n", styles: ["table{border-collapse:collapse;border-spacing:0}\n"] }]
|
|
3268
|
+
}], ctorParameters: function () { return [{ type: UserService }, { type: DnsService }]; }, propDecorators: { formControl: [{
|
|
3269
|
+
type: Input
|
|
3270
|
+
}], routePartition: [{
|
|
3271
|
+
type: Input
|
|
3272
|
+
}], directoryNumber: [{
|
|
3273
|
+
type: Input
|
|
3274
|
+
}], siteId: [{
|
|
3275
|
+
type: Input
|
|
3276
|
+
}], onChange: [{
|
|
3277
|
+
type: Output
|
|
3278
|
+
}] } });
|
|
3279
|
+
|
|
3280
|
+
class UserDeviceManageModule {
|
|
3281
|
+
}
|
|
3282
|
+
UserDeviceManageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3283
|
+
UserDeviceManageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, declarations: [AppLoaderComponent,
|
|
3284
|
+
NotificationsComponent,
|
|
3285
|
+
LazyLoadingSelectComponent,
|
|
3286
|
+
DeviceListComponent,
|
|
3287
|
+
DeviceManageWidgetComponent,
|
|
3288
|
+
DeviceAssociatedLineComponent,
|
|
3289
|
+
DeviceAssociatedLineExtensionComponent,
|
|
3290
|
+
DeviceAssociatedLineDetailsBoxComponent,
|
|
3291
|
+
AssociatedLineRowComponent,
|
|
3292
|
+
InfoDialogComponent], imports: [CommonModule,
|
|
3293
|
+
BrowserModule,
|
|
3294
|
+
BrowserAnimationsModule,
|
|
3295
|
+
FormsModule,
|
|
3296
|
+
ReactiveFormsModule,
|
|
3297
|
+
HttpClientModule,
|
|
3298
|
+
MaterialModule], exports: [DeviceManageWidgetComponent] });
|
|
3299
|
+
UserDeviceManageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, providers: [
|
|
3300
|
+
APIService,
|
|
3301
|
+
UserService,
|
|
3302
|
+
NotificationService,
|
|
3303
|
+
RemoveKynFromIBMService,
|
|
3304
|
+
SiteSettingsService,
|
|
3305
|
+
DnsService,
|
|
3306
|
+
LineService,
|
|
3307
|
+
DeviceService,
|
|
3308
|
+
ValidationService,
|
|
3309
|
+
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
|
|
3310
|
+
], imports: [CommonModule,
|
|
3311
|
+
BrowserModule,
|
|
3312
|
+
BrowserAnimationsModule,
|
|
3313
|
+
FormsModule,
|
|
3314
|
+
ReactiveFormsModule,
|
|
3315
|
+
HttpClientModule,
|
|
3316
|
+
MaterialModule] });
|
|
3317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UserDeviceManageModule, decorators: [{
|
|
3318
|
+
type: NgModule,
|
|
3319
|
+
args: [{
|
|
3320
|
+
declarations: [
|
|
3321
|
+
AppLoaderComponent,
|
|
3322
|
+
NotificationsComponent,
|
|
3323
|
+
LazyLoadingSelectComponent,
|
|
3324
|
+
DeviceListComponent,
|
|
3325
|
+
DeviceManageWidgetComponent,
|
|
3326
|
+
DeviceAssociatedLineComponent,
|
|
3327
|
+
DeviceAssociatedLineExtensionComponent,
|
|
3328
|
+
DeviceAssociatedLineDetailsBoxComponent,
|
|
3329
|
+
AssociatedLineRowComponent,
|
|
3330
|
+
InfoDialogComponent
|
|
3331
|
+
],
|
|
3332
|
+
imports: [
|
|
3333
|
+
CommonModule,
|
|
3334
|
+
BrowserModule,
|
|
3335
|
+
BrowserAnimationsModule,
|
|
3336
|
+
FormsModule,
|
|
3337
|
+
ReactiveFormsModule,
|
|
3338
|
+
HttpClientModule,
|
|
3339
|
+
MaterialModule,
|
|
3340
|
+
],
|
|
3341
|
+
providers: [
|
|
3342
|
+
APIService,
|
|
3343
|
+
UserService,
|
|
3344
|
+
NotificationService,
|
|
3345
|
+
RemoveKynFromIBMService,
|
|
3346
|
+
SiteSettingsService,
|
|
3347
|
+
DnsService,
|
|
3348
|
+
LineService,
|
|
3349
|
+
DeviceService,
|
|
3350
|
+
ValidationService,
|
|
3351
|
+
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
|
|
3352
|
+
],
|
|
3353
|
+
exports: [
|
|
3354
|
+
DeviceManageWidgetComponent
|
|
3355
|
+
]
|
|
3356
|
+
}]
|
|
3357
|
+
}] });
|
|
3358
|
+
|
|
3359
|
+
/**
|
|
3360
|
+
* Generated bundle index. Do not edit.
|
|
3361
|
+
*/
|
|
3362
|
+
|
|
3363
|
+
export { APIService, DeviceManageWidgetComponent, DeviceService, LineService, SiteSettingsService, UserDeviceManageModule, UserService, UtilsService };
|
|
3364
|
+
//# sourceMappingURL=tuki-io-tuki-widgets-user-device-manage.mjs.map
|