@c8y/ng1-modules 1024.16.21 → 1024.18.1

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.
@@ -2607,6 +2607,9 @@ msgstr "可用事件"
2607
2607
  msgid "Available firmwares matching the device type"
2608
2608
  msgstr "与设备类型匹配的可用固件"
2609
2609
 
2610
+ msgid "Available from repository"
2611
+ msgstr "可从仓库获取"
2612
+
2610
2613
  msgid "Available placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to downloadable file is: {tenant-domain}/apps/public/login/index.html#/?download={binaryId}."
2611
2614
  msgstr "可用占位符: {tenant-domain}、 {host}、 {binaryId}。可下载文件的完整链接为: {tenant-domain}/apps/public/login/index.html#/?download={binaryId}。"
2612
2615
 
@@ -2619,9 +2622,6 @@ msgstr "可用插件"
2619
2622
  msgid "Available softwares matching the device type"
2620
2623
  msgstr "与设备类型匹配的可用软件"
2621
2624
 
2622
- msgid "Available supported configurations"
2623
- msgstr "可用的受支持配置"
2624
-
2625
2625
  msgid "Average"
2626
2626
  msgstr "平均值"
2627
2627
 
@@ -3410,6 +3410,11 @@ msgstr "已更改"
3410
3410
  msgid "Changes"
3411
3411
  msgstr "更改"
3412
3412
 
3413
+ msgid "Changes apply to the configuration repository and affect ongoing updates and future device\n"
3414
+ " deployments."
3415
+ msgstr "更改将应用于配置存储库,并会影响正在进行的更新以及未来的设备\n"
3416
+ " 部署。"
3417
+
3413
3418
  msgid "Changes done in the home dashboard are reflected across the platform."
3414
3419
  msgstr "在主仪表板中所做的更改会反映在整个平台上。"
3415
3420
 
@@ -6270,9 +6275,6 @@ msgstr "设备 {{id}}"
6270
6275
  msgid "Device's name or value of any device's property"
6271
6276
  msgstr "设备的名称或任意设备的属性值"
6272
6277
 
6273
- msgid "Device-supported configurations"
6274
- msgstr "设备支持的配置"
6275
-
6276
6278
  msgid "Devices"
6277
6279
  msgstr "设备"
6278
6280
 
@@ -6896,6 +6898,12 @@ msgstr "编辑书签"
6896
6898
  msgid "Edit coil: \"{{name}}\""
6897
6899
  msgstr "编辑线圈:\"{{name}}\""
6898
6900
 
6901
+ msgid "Edit configuration"
6902
+ msgstr "编辑配置"
6903
+
6904
+ msgid "Edit configuration in repository"
6905
+ msgstr "在代码库中编辑配置"
6906
+
6899
6907
  msgid "Edit dashboard"
6900
6908
  msgstr "编辑仪表板"
6901
6909
 
@@ -8493,6 +8501,9 @@ msgstr "频率(秒)"
8493
8501
  msgid "From date"
8494
8502
  msgstr "自日期"
8495
8503
 
8504
+ msgid "From repository"
8505
+ msgstr "来自代码库"
8506
+
8496
8507
  msgid "From/To date filter"
8497
8508
  msgstr "起始/终止日期过滤器"
8498
8509
 
@@ -12207,9 +12218,6 @@ msgstr "不存在样本值,请首先连接设备。"
12207
12218
  msgid "No selection"
12208
12219
  msgstr "无选择"
12209
12220
 
12210
- msgid "No selection."
12211
- msgstr "无选择。"
12212
-
12213
12221
  msgid "No server to display."
12214
12222
  msgstr "没有可供显示的服务器。"
12215
12223
 
@@ -12620,6 +12628,9 @@ msgstr "出现警报时发送短信"
12620
12628
  msgid "On alarm send email"
12621
12629
  msgstr "出现警报时创建电子邮件"
12622
12630
 
12631
+ msgid "On device"
12632
+ msgstr "在设备上"
12633
+
12623
12634
  msgid "On entering"
12624
12635
  msgstr "输入时"
12625
12636
 
@@ -15200,12 +15211,12 @@ msgstr "选择\"覆盖继承项\"以启用。"
15200
15211
  msgid "Select API and method above to see required API values."
15201
15212
  msgstr "选择上述 API 和方法以查看所需的 API 值。"
15202
15213
 
15203
- msgid "Select a configuration from the device-supported configuration list."
15204
- msgstr "从设备支持的配置列表中选择配置。"
15205
-
15206
15214
  msgid "Select a configuration to preview."
15207
15215
  msgstr "选择要预览的配置。"
15208
15216
 
15217
+ msgid "Select a configuration type from the list above to view matching repository items."
15218
+ msgstr "从上面的列表中选择一种配置类型,以查看匹配的存储库项目。"
15219
+
15209
15220
  msgid "Select a data point to view its aggregated values in the time slider."
15210
15221
  msgstr "选择一个数据点,即可在时间滑块中查看其聚合值。"
15211
15222
 
@@ -17395,6 +17406,9 @@ msgstr "支持格式:支持的格式:OpenSSHv1、OpenSSHv2、PEM、SSH2。<b
17395
17406
  msgid "Supported operations"
17396
17407
  msgstr "支持的操作"
17397
17408
 
17409
+ msgid "Supported predefined configurations you can send to this device"
17410
+ msgstr "支持发送至该设备的预定义配置"
17411
+
17398
17412
  msgid "Supports markdown. Use {{ headerMark }} for headers, {{ listMark }} for lists, {{ boldMark }} for bold, {{ italicMark }} for italic, and {{ linkMark }} for links."
17399
17413
  msgstr "支持标记。使用 {{ headerMark }} 表示页眉,使用 {{ listMark }} 表示列表,使用 {{ boldMark }} 表示粗体,使用 {{ italicMark }} 表示斜体,使用 {{ linkMark }} 表示链接。"
17400
17414
 
@@ -17713,9 +17727,6 @@ msgstr "值为 1 时要显示的文本"
17713
17727
  msgid "Text to show if value is zero"
17714
17728
  msgstr "值为零时要显示的文本"
17715
17729
 
17716
- msgid "Text-based configuration"
17717
- msgstr "基于文本的配置"
17718
-
17719
17730
  msgid "Thank you for the feedback!"
17720
17731
  msgstr "感谢您的反馈!"
17721
17732
 
@@ -17950,9 +17961,6 @@ msgstr "文件为空。"
17950
17961
  msgid "The file is no longer available."
17951
17962
  msgstr "文件不再可用。"
17952
17963
 
17953
- msgid "The file is not available."
17954
- msgstr "文件不可用。"
17955
-
17956
17964
  msgid "The filename exceeds limit of {{ limit }} characters."
17957
17965
  msgstr "文件名超过 {{ limit }} 个字符的限制。"
17958
17966
 
@@ -18419,6 +18427,9 @@ msgstr "此命令可用于迁移以非标准方式创建的 LWM2M 设备。它
18419
18427
  msgid "This command returns a list of shell commands with description that can be created for the LWM2M device connector."
18420
18428
  msgstr "此命令将返回一个 shell 命令列表,其中包含可为 LWM2M 设备连接器创建的描述。"
18421
18429
 
18430
+ msgid "This configuration is a binary file and cannot be shown as text."
18431
+ msgstr "此配置文件是一个二进制文件,无法以文本形式显示。"
18432
+
18422
18433
  msgid "This dashboard belongs to \"{{app}}\". Manage its visibility there."
18423
18434
  msgstr "此仪表板属于“{{app}}”。请在此处管理其可见性。"
18424
18435
 
@@ -18966,6 +18977,9 @@ msgstr "尝试其他搜索词。"
18966
18977
  msgid "Try changing your search criteria."
18967
18978
  msgstr "尝试更改您的搜索条件。"
18968
18979
 
18980
+ msgid "Try getting a snapshot from the device or open it in the repository"
18981
+ msgstr "尝试从设备中获取一个快照,或者在仓库中打开它"
18982
+
18969
18983
  msgid "Try it out:"
18970
18984
  msgstr "试试看:"
18971
18985
 
@@ -2607,6 +2607,9 @@ msgstr "可用事件"
2607
2607
  msgid "Available firmwares matching the device type"
2608
2608
  msgstr "与设备类型匹配的可用固件"
2609
2609
 
2610
+ msgid "Available from repository"
2611
+ msgstr "可從儲存庫取得"
2612
+
2610
2613
  msgid "Available placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to downloadable file is: {tenant-domain}/apps/public/login/index.html#/?download={binaryId}."
2611
2614
  msgstr "可用的占位符: {tenant-domain}、 {host}、 {binaryId}。可下载文件的完整链接为: {tenant-domain}/apps/public/login/index.html#/?download={binaryId}。"
2612
2615
 
@@ -2619,9 +2622,6 @@ msgstr "可用插件"
2619
2622
  msgid "Available softwares matching the device type"
2620
2623
  msgstr "与设备类型匹配的可用软件"
2621
2624
 
2622
- msgid "Available supported configurations"
2623
- msgstr "可用的受支持配置"
2624
-
2625
2625
  msgid "Average"
2626
2626
  msgstr "平均值"
2627
2627
 
@@ -3410,6 +3410,11 @@ msgstr "已更改"
3410
3410
  msgid "Changes"
3411
3411
  msgstr "更改"
3412
3412
 
3413
+ msgid "Changes apply to the configuration repository and affect ongoing updates and future device\n"
3414
+ " deployments."
3415
+ msgstr "變更將套用至配置儲存庫,並會影響正在進行的更新以及未來的裝置\n"
3416
+ " 部署作業。"
3417
+
3413
3418
  msgid "Changes done in the home dashboard are reflected across the platform."
3414
3419
  msgstr "在主仪表板中所做的更改会反映在整个平台上。"
3415
3420
 
@@ -6270,9 +6275,6 @@ msgstr "设备 {{id}}"
6270
6275
  msgid "Device's name or value of any device's property"
6271
6276
  msgstr "设备的名称或任意设备的属性值"
6272
6277
 
6273
- msgid "Device-supported configurations"
6274
- msgstr "设备支持的配置"
6275
-
6276
6278
  msgid "Devices"
6277
6279
  msgstr "设备"
6278
6280
 
@@ -6896,6 +6898,12 @@ msgstr "編輯書簽"
6896
6898
  msgid "Edit coil: \"{{name}}\""
6897
6899
  msgstr "编辑线圈:\"{{name}}\""
6898
6900
 
6901
+ msgid "Edit configuration"
6902
+ msgstr "編輯設定"
6903
+
6904
+ msgid "Edit configuration in repository"
6905
+ msgstr "在儲存庫中編輯設定"
6906
+
6899
6907
  msgid "Edit dashboard"
6900
6908
  msgstr "編輯儀錶板"
6901
6909
 
@@ -8490,6 +8498,9 @@ msgstr "頻率(秒)"
8490
8498
  msgid "From date"
8491
8499
  msgstr "自日期"
8492
8500
 
8501
+ msgid "From repository"
8502
+ msgstr "來自儲存庫"
8503
+
8493
8504
  msgid "From/To date filter"
8494
8505
  msgstr "起始/终止日期过滤器"
8495
8506
 
@@ -12204,9 +12215,6 @@ msgstr "不存在样本值,请首先连接设备。"
12204
12215
  msgid "No selection"
12205
12216
  msgstr "无选择"
12206
12217
 
12207
- msgid "No selection."
12208
- msgstr "無選取。"
12209
-
12210
12218
  msgid "No server to display."
12211
12219
  msgstr "没有可供显示的服务器。"
12212
12220
 
@@ -12617,6 +12625,9 @@ msgstr "出現警報時發送短信"
12617
12625
  msgid "On alarm send email"
12618
12626
  msgstr "出現警報時創建電子郵件"
12619
12627
 
12628
+ msgid "On device"
12629
+ msgstr "在裝置上"
12630
+
12620
12631
  msgid "On entering"
12621
12632
  msgstr "输入时"
12622
12633
 
@@ -15197,12 +15208,12 @@ msgstr "选择\"覆盖继承项\"以启用。"
15197
15208
  msgid "Select API and method above to see required API values."
15198
15209
  msgstr "选择上述 API 和方法以查看所需的 API 值。"
15199
15210
 
15200
- msgid "Select a configuration from the device-supported configuration list."
15201
- msgstr "從設備支援的配置清單中選取配置。"
15202
-
15203
15211
  msgid "Select a configuration to preview."
15204
15212
  msgstr "選取要預覽的配置。"
15205
15213
 
15214
+ msgid "Select a configuration type from the list above to view matching repository items."
15215
+ msgstr "請從上方清單中選擇一種配置類型,以檢視相符的儲存庫項目。"
15216
+
15206
15217
  msgid "Select a data point to view its aggregated values in the time slider."
15207
15218
  msgstr "选择一个数据点,即可在时间滑桿中检视其聚合值。"
15208
15219
 
@@ -17393,6 +17404,9 @@ msgstr "支援的格式:OpenSSHv1、OpenSSHv2、PEM、SSH2。<br>支援的演
17393
17404
  msgid "Supported operations"
17394
17405
  msgstr "支持的操作"
17395
17406
 
17407
+ msgid "Supported predefined configurations you can send to this device"
17408
+ msgstr "可傳送至此裝置的預設配置"
17409
+
17396
17410
  msgid "Supports markdown. Use {{ headerMark }} for headers, {{ listMark }} for lists, {{ boldMark }} for bold, {{ italicMark }} for italic, and {{ linkMark }} for links."
17397
17411
  msgstr "支援標記。使用 {{ headerMark }} 表示頁眉,使用 {{ listMark }} 表示清單,使用 {{ boldMark }} 表示粗體,使用 {{ italicMark }} 表示斜體,使用 {{ linkMark }} 表示連結。"
17398
17412
 
@@ -17711,9 +17725,6 @@ msgstr "值为 1 时要显示的文本"
17711
17725
  msgid "Text to show if value is zero"
17712
17726
  msgstr "值为零时要显示的文本"
17713
17727
 
17714
- msgid "Text-based configuration"
17715
- msgstr "基于文本的配置"
17716
-
17717
17728
  msgid "Thank you for the feedback!"
17718
17729
  msgstr "感謝您的回饋!"
17719
17730
 
@@ -17948,9 +17959,6 @@ msgstr "文件为空。"
17948
17959
  msgid "The file is no longer available."
17949
17960
  msgstr "文件不再可用。"
17950
17961
 
17951
- msgid "The file is not available."
17952
- msgstr "文件不可用。"
17953
-
17954
17962
  msgid "The filename exceeds limit of {{ limit }} characters."
17955
17963
  msgstr "檔案名超過 {{ limit }} 個字元的限制。"
17956
17964
 
@@ -18417,6 +18425,9 @@ msgstr "此命令可用于迁移以非标准方式创建的 LWM2M 设备。它
18417
18425
  msgid "This command returns a list of shell commands with description that can be created for the LWM2M device connector."
18418
18426
  msgstr "此命令将返回一个 shell 命令列表,其中包含可为 LWM2M 设备连接器创建的描述。"
18419
18427
 
18428
+ msgid "This configuration is a binary file and cannot be shown as text."
18429
+ msgstr "此設定檔為二進位檔案,無法以文字形式顯示。"
18430
+
18420
18431
  msgid "This dashboard belongs to \"{{app}}\". Manage its visibility there."
18421
18432
  msgstr "此仪表板隸屬於「{{app}}」。請於該處管理其顯示設定。"
18422
18433
 
@@ -18964,6 +18975,9 @@ msgstr "嘗試其他搜尋詞。"
18964
18975
  msgid "Try changing your search criteria."
18965
18976
  msgstr "尝试更改您的搜索条件。"
18966
18977
 
18978
+ msgid "Try getting a snapshot from the device or open it in the repository"
18979
+ msgstr "試著從裝置擷取快照,或將其開啟至儲存庫中"
18980
+
18967
18981
  msgid "Try it out:"
18968
18982
  msgstr "試試看:"
18969
18983
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1024.16.21",
3
+ "version": "1024.18.1",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -1 +1 @@
1
- function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(r,e){var n,t=Object.keys(r);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(r),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),t.push.apply(t,n)),t}function _objectSpread(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function _defineProperty(e,r,n){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===r?String:Number)(e);n=n.call(e,r||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{function e(a,D,c,e,f,l,d,p,r,n,t,g,E,o,m,i,h){var s,u,y,v=this,w=(_.assign(v,{cancel:g.gotoList,shouldDisableGlobalRolesCheckbox:M,isUserAndRolesFormPristine:T,isUserFormInvalid:b,isRolesFormInvalid:U,canSave:function(){return!(c.saving||T()||b()||U())},getUserData:S,getRoleName:i.getName}),e.userId),N=["business"];function O(){w?l.detail(w).then(function(e){return e.data}).then(R).then(function(){return l.getUserTfaSettings(c.user).then(f.getResData).then(function(e){c.userTfaEnforced=!!e.tfaEnforced})}):(R({enabled:c.isNew=!0}),C(h("New user"),!0))}function R(e){u=e.email,e.devicePermissions=e.devicePermissions||{},c.user=e,c._groups=A(e),c.password.showPassword=c.isNew,c.hasExternalOrigin=l.hasExternalOrigin(e),c.isNew&&(_.forEach(c.groups,function(e){_.includes(N,e.name)&&(c._groups[e.id]=!0)}),y)&&p.warning(g.LOCAL_USER_TEXT),c.hasExternalOrigin&&o.isSsoClearingUserRolesOnEveryLogin().then(function(e){return c.userCanEditRoles=!e,c.userCanEditRoles}).then(function(e){e?p.warning(g.EXTERNAL_ORIGIN_DYNAMIC_ACCESS_MAPPING_EXCEPTION_TEXT):p.warning(g.EXTERNAL_ORIGIN_TEXT)})}function T(){return c.forms.userForm.$pristine&&c.forms.rolesForm.$pristine}function b(){return!!(G(c.currentUser,c.user)&&!c.hasExternalOrigin)&&c.forms.userForm.$invalid}function U(){return!M()&&c.forms.rolesForm.$invalid}function A(e){return _.reduce(_.get(e,"groups.references"),function(e,r){return e[r.group.id]=!0,e},{})}function P(e){c.groups=e}function $(e){c.currentUser=e}function S(e){return c.isNew?_.omitBy(_.omit(e,["measurementUnit"]),function(e,r){return"displayName"===r&&""===_.trim(e)}):_objectSpread(_objectSpread({},_.omit(e,["measurementUnit","password"])),{},{displayName:""===_.trim(e.displayName)?"":e.displayName})}function I(n,e){function r(){return p.success(h("User saved."))}var t=1<arguments.length&&void 0!==e?e:"",e=(c.saving=!0,g.gotoList),o=!(n.id&&!n.groups),i=_(c._groups).map(function(e,r){return e&&parseInt(r,10)}).filter().value(),s=o?function(){return d.updateGroups(0<arguments.length&&void 0!==arguments[0]?arguments[0]:n,i)}:function(){return a.resolve()},o=c.forms.rolesForm.$dirty,u=c.password.showPassword;try{(c.hasExternalOrigin?g.warnAboutUserLogOutIfNeeded(n,{rolesChanged:o,passwordChanged:u}).then(function(){return s()}):g.warnAboutUserLogOutIfNeeded(n,{rolesChanged:o,passwordChanged:u}).then(function(){return n.password&&!c.isNew?l.changePassword(n,n.password,t):a.resolve()}).then(function(){return l.current()}).then(function(e){return _.isEqual(e.userName,n.userName)}).then(function(e){var r;return m.isActivatedFor("units-conversion")&&(e&&(r=n,r=_.get(n,"measurementUnit.value"),E.set("unit",r)),_.unset(n,"measurementUnit")),e}).then(function(e){return l.save(S(n),e)}).then(f.getResData).then(function(e){return s(e)}).then(function(){return l.setUserTfaSettings(n,{tfaEnforced:!!c.userTfaEnforced})})).then(r).then(e).finally(function(){c.saving=!1})}catch(e){p.danger(e.message),c.saving=!1}}function C(){return r.changeTitle({title:0<arguments.length&&void 0!==arguments[0]?arguments[0]:""},{skipTitleTranslation:!(1<arguments.length&&void 0!==arguments[1]&&arguments[1])})}function L(e){return l.hasRole(e,"ROLE_USER_MANAGEMENT_ADMIN")||l.hasRole(e,"ROLE_USER_MANAGEMENT_CREATE")}function G(e,r){return!(!e||!r)&&(!r.id||(e.id===r.id?l.hasRole(e,"ROLE_USER_MANAGEMENT_OWN_ADMIN"):l.hasRole(e,"ROLE_USER_MANAGEMENT_ADMIN")||l.hasRole(e,"ROLE_USER_MANAGEMENT_CREATE")))}function j(e){return _.get(c.user,"owner")&&s&&!s[e.id]}function M(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=L(c.currentUser),e=!e||!j(e),n=!!c.userCanEditRoles||!c.hasExternalOrigin;return!(r&&e&&n)}c.checkPassword=function(r){var e=!c.isNew,n=c.password.showPassword||(e=>e.email!==u)(r);return e&&n?t.currentPassword().then(function(e){return I(r,e)}).catch(function(e){e&&p.danger(f.getResErrorMessage(e)),O()}):I(r)},c.$watch("user.userName",C),c.$watch("user.owner",function(e){e?l.detail(e).then(f.getResData).then(function(e){s=A(e),_.forEach(c._groups,function(e,r){c._groups[r]=e&&s[r]})}):s=null}),c.$watch("_groups",function(e){c.enforcedGroup&&(c.topLevelTfaEnforced=e[c.enforcedGroup.id])},!0),c.canEditUser=G,c.canEditUserGroups=L,c.canActivateUser=function(e,r){return!(!e||!r)&&e.id!==r.id},c.forms={},c.password={},c.saving=!1,c.showAcl=function(){var e=_.get(c.user,"devicePermissions"),e=_.keys(e);return f.getFlag("deprecated")||e.length},c.restrictedByOwner=j,c.$on("$destroy",function(){p.remove({text:g.EXTERNAL_ORIGIN_TEXT,type:"warning"}),p.remove({text:g.EXTERNAL_ORIGIN_DYNAMIC_ACCESS_MAPPING_EXCEPTION_TEXT,type:"warning"}),p.remove({text:g.LOCAL_USER_TEXT,type:"warning"})}),d.list(void 0).then(P).then(o.isSsoEnabled).then(function(e){y=e}).then(O).then(function(){return n.current().then(function(e){return l.getTenantTfaSettings(c.user,e.name)}).then(function(e){c.enforcedGroup=_.find(c.groups,{name:e.enforcedUsersGroup}),c.topLevelTfaEnforced=l.isEnforcedForUser(c.user,e)||c._groups[c.enforcedGroup.id]})}),l.current().then($),g.userHierarchyActive().then(function(e){v.FEATURE_USER_HIERARCHY=e})}e.$inject=["$q","$injector","$scope","$routeParams","c8yBase","c8yUser","c8yUserGroup","c8yAlert","c8yTitle","c8yTenant","c8yUserUtil","c8yUsersUi","c8yUserPreferences","c8yLoginOptions","c8yBeta","c8yPropertyValueTransformService","gettext"],angular.module("c8y.users").component("c8yUserDetailView",{templateUrl:":::PLUGIN_PATH:::/userDetailView/userDetailView.html",controller:e,controllerAs:"vm"})})();
1
+ function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(r,e){var n,t=Object.keys(r);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(r),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),t.push.apply(t,n)),t}function _objectSpread(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function _defineProperty(e,r,n){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===r?String:Number)(e);n=n.call(e,r||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{function e(a,D,c,e,f,l,d,p,r,n,t,g,E,o,m,i,h){var s,u,y,v=this,w=(_.assign(v,{cancel:g.gotoList,shouldDisableGlobalRolesCheckbox:M,isUserAndRolesFormPristine:b,isUserFormInvalid:T,isRolesFormInvalid:U,canSave:function(){return!(c.saving||b()||T()||U())},getUserData:S,getRoleName:i.getName}),e.userId),N=["business"];function O(){w?l.detail(w).then(function(e){return e.data}).then(R).then(function(){return l.getUserTfaSettings(c.user).then(f.getResData).then(function(e){c.userTfaEnforced=!!e.tfaEnforced})}):(R({enabled:c.isNew=!0}),C(h("New user"),!0))}function R(e){u=e.email,e.devicePermissions=e.devicePermissions||{},c.user=e,c._groups=A(e),c.password.showPassword=c.isNew,c.hasExternalOrigin=l.hasExternalOrigin(e),c.isNew&&(_.forEach(c.groups,function(e){_.includes(N,e.name)&&(c._groups[e.id]=!0)}),y)&&p.warning(g.LOCAL_USER_TEXT),c.hasExternalOrigin&&o.isSsoClearingUserRolesOnEveryLogin().then(function(e){return c.userCanEditRoles=!e,c.userCanEditRoles}).then(function(e){e?p.warning(g.EXTERNAL_ORIGIN_DYNAMIC_ACCESS_MAPPING_EXCEPTION_TEXT):p.warning(g.EXTERNAL_ORIGIN_TEXT)})}function b(){return c.forms.userForm.$pristine&&c.forms.rolesForm.$pristine}function T(){return!!(G(c.currentUser,c.user)&&!c.hasExternalOrigin)&&c.forms.userForm.$invalid}function U(){return!M()&&c.forms.rolesForm.$invalid}function A(e){return _.reduce(_.get(e,"groups.references"),function(e,r){return e[r.group.id]=!0,e},{})}function P(e){c.groups=e}function $(e){c.currentUser=e}function S(e){return c.isNew?_.omitBy(_.omit(e,["measurementUnit"]),function(e,r){return"displayName"===r&&""===_.trim(e)}):_objectSpread(_objectSpread({},_.omit(e,["measurementUnit","password"])),{},{displayName:""===_.trim(e.displayName)?"":e.displayName})}function I(n,e){function r(){return p.success(h("User saved."))}var t=1<arguments.length&&void 0!==e?e:"",e=(c.saving=!0,g.gotoList),o=!(n.id&&!n.groups),i=_(c._groups).map(function(e,r){return e&&parseInt(r,10)}).filter().value(),s=o?function(){return d.updateGroups(0<arguments.length&&void 0!==arguments[0]?arguments[0]:n,i)}:function(){return a.resolve()},o=c.forms.rolesForm.$dirty,u=c.password.showPassword;try{(c.hasExternalOrigin?g.warnAboutUserLogOutIfNeeded(n,{rolesChanged:o,passwordChanged:u}).then(function(){return s()}):g.warnAboutUserLogOutIfNeeded(n,{rolesChanged:o,passwordChanged:u}).then(function(){return n.password&&!c.isNew?l.changePassword(n,n.password,t):a.resolve()}).then(function(){return l.current()}).then(function(e){return _.isEqual(e.userName,n.userName)}).then(function(e){var r;return m.isActivatedFor("units-conversion")&&(e&&(r=n,r=_.get(n,"measurementUnit.value"),E.set("unit",r)),_.unset(n,"measurementUnit")),e}).then(function(e){return l.save(S(n),e)}).then(f.getResData).then(function(e){return s(e)}).then(function(){return l.setUserTfaSettings(n,{tfaEnforced:!!c.userTfaEnforced})})).then(r).then(e).finally(function(){c.saving=!1})}catch(e){p.danger(e.message),c.saving=!1}}function C(){return r.changeTitle({title:0<arguments.length&&void 0!==arguments[0]?arguments[0]:""},{skipTitleTranslation:!(1<arguments.length&&void 0!==arguments[1]&&arguments[1])})}function L(e){return l.hasRole(e,"ROLE_USER_MANAGEMENT_ADMIN")||l.hasRole(e,"ROLE_USER_MANAGEMENT_CREATE")}function G(e,r){return!(!e||!r)&&(!r.id||(e.id===r.id?l.hasRole(e,"ROLE_USER_MANAGEMENT_OWN_ADMIN"):l.hasRole(e,"ROLE_USER_MANAGEMENT_ADMIN")||l.hasRole(e,"ROLE_USER_MANAGEMENT_CREATE")))}function j(e){return _.get(c.user,"owner")&&s&&!s[e.id]}function M(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=L(c.currentUser),e=!e||!j(e),n=!!c.userCanEditRoles||!c.hasExternalOrigin;return!(r&&e&&n)}c.checkPassword=function(r){var e=!c.isNew,n=c.password.showPassword||(e=>e.email!==u)(r);return e&&n?t.currentPassword().then(function(e){return I(r,e)}).catch(function(e){e&&p.danger(f.getResErrorMessage(e)),O()}):I(r)},c.$watch("user.userName",C),c.$watch("user.owner",function(e){e?l.detail(e).then(f.getResData).then(function(e){s=A(e),_.forEach(c._groups,function(e,r){c._groups[r]=e&&s[r]})}):s=null}),c.$watch("_groups",function(e){c.enforcedGroup&&(c.topLevelTfaEnforced=e[c.enforcedGroup.id])},!0),c.canEditUser=G,c.canEditUserGroups=L,c.canActivateUser=function(e,r){return!(!e||!r)&&e.id!==r.id},c.forms={},c.password={},c.saving=!1,c.showAcl=function(){var e=_.get(c.user,"devicePermissions"),e=_.keys(e);return f.getFlag("deprecated")||e.length},c.restrictedByOwner=j,c.$on("$destroy",function(){p.remove({text:g.EXTERNAL_ORIGIN_TEXT,type:"warning"}),p.remove({text:g.EXTERNAL_ORIGIN_DYNAMIC_ACCESS_MAPPING_EXCEPTION_TEXT,type:"warning"}),p.remove({text:g.LOCAL_USER_TEXT,type:"warning"})}),d.list(_objectSpread({pageSize:1e3},void 0)).then(P).then(o.isSsoEnabled).then(function(e){y=e}).then(O).then(function(){return n.current().then(function(e){return l.getTenantTfaSettings(c.user,e.name)}).then(function(e){c.enforcedGroup=_.find(c.groups,{name:e.enforcedUsersGroup}),c.topLevelTfaEnforced=l.isEnforcedForUser(c.user,e)||c._groups[c.enforcedGroup.id]})}),l.current().then($),g.userHierarchyActive().then(function(e){v.FEATURE_USER_HIERARCHY=e})}e.$inject=["$q","$injector","$scope","$routeParams","c8yBase","c8yUser","c8yUserGroup","c8yAlert","c8yTitle","c8yTenant","c8yUserUtil","c8yUsersUi","c8yUserPreferences","c8yLoginOptions","c8yBeta","c8yPropertyValueTransformService","gettext"],angular.module("c8y.users").component("c8yUserDetailView",{templateUrl:":::PLUGIN_PATH:::/userDetailView/userDetailView.html",controller:e,controllerAs:"vm"})})();