@c8y/ngx-components 1018.503.1 → 1018.503.23
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/core/common/ApplicationOptions.d.ts +4 -2
- package/core/common/files.service.d.ts +10 -2
- package/core/common/global-config.service.d.ts +1 -1
- package/core/common/permissions.service.d.ts +69 -2
- package/core/common/tenant-ui.service.d.ts +1 -1
- package/core/i18n/pattern-messages.data.d.ts +20 -20
- package/esm2020/assets-navigator/asset-node.service.mjs +11 -4
- package/esm2020/auth-configuration/auth-configuration.guard.mjs +5 -2
- package/esm2020/auth-configuration/factories/navigation.factory.mjs +3 -3
- package/esm2020/cockpit-config/cockpit-config.guard.mjs +2 -2
- package/esm2020/cockpit-config/cockpit-config.service.mjs +2 -2
- package/esm2020/context-dashboard/add-dashboard.factory.mjs +13 -3
- package/esm2020/context-dashboard/context-dashboard.component.mjs +2 -2
- package/esm2020/context-dashboard/context-dashboard.service.mjs +11 -3
- package/esm2020/context-dashboard/dashboard-detail.component.mjs +7 -2
- package/esm2020/context-dashboard/report-dashboard/report-dashboard-list.component.mjs +5 -3
- package/esm2020/core/bottom-drawer/bottom-drawer.service.mjs +1 -1
- package/esm2020/core/common/ApplicationOptions.mjs +1 -1
- package/esm2020/core/common/files.service.mjs +20 -4
- package/esm2020/core/common/global-config.service.mjs +7 -2
- package/esm2020/core/common/permissions.service.mjs +69 -2
- package/esm2020/core/common/tenant-ui.service.mjs +3 -2
- package/esm2020/core/common/user-preferences/user-preferences.service.mjs +10 -2
- package/esm2020/core/docs/support-outlet/support-outlet.component.mjs +3 -2
- package/esm2020/core/drop-area/drop-area.component.mjs +3 -1
- package/esm2020/core/i18n/pattern-messages.data.mjs +21 -21
- package/esm2020/core/setup/setup.service.mjs +2 -2
- package/esm2020/core/user/user-edit.component.mjs +1 -1
- package/esm2020/ecosystem/application-properties/application-properties.component.mjs +2 -2
- package/esm2020/ecosystem/application-properties/subscription-modal/subscription-modal.component.mjs +3 -3
- package/esm2020/ecosystem/ecosystem-navigation.factory.mjs +3 -3
- package/esm2020/ecosystem/packages/package-list/packages-list.component.mjs +2 -2
- package/esm2020/ecosystem/packages/package-versions/package-versions-list/package-versions-list.component.mjs +2 -2
- package/esm2020/files-repository/files-repository.guard.mjs +6 -3
- package/esm2020/location/location.component.mjs +20 -13
- package/esm2020/map/cluster-map.component.mjs +19 -11
- package/esm2020/map/cluster-map.mjs +8 -3
- package/esm2020/map/map-status.component.mjs +19 -5
- package/esm2020/map/map.component.mjs +10 -10
- package/esm2020/map/map.model.mjs +1 -19
- package/esm2020/map/map.service.mjs +24 -1
- package/esm2020/protocol-lwm2m/components/bootstrap-parameters/lwm2m-bootstrap-parameters.component.mjs +2 -2
- package/esm2020/protocol-lwm2m/components/configuration/typed-forms/form-wrapper-base.component.mjs +2 -2
- package/esm2020/register-device/register-device-navigation.factory.mjs +3 -3
- package/esm2020/replace-device/replace-device.service.mjs +15 -7
- package/esm2020/reports/export-schedules.component.mjs +3 -3
- package/esm2020/repository/configuration/device-tab/configuration-preview.component.mjs +14 -6
- package/esm2020/sms-gateway/sms-gateway.guard.mjs +2 -2
- package/esm2020/sms-gateway/sms-gateway.module.mjs +6 -6
- package/esm2020/sub-assets/add-group/add-group.component.mjs +7 -2
- package/esm2020/sub-assets/asset-properties-item.component.mjs +6 -6
- package/esm2020/sub-assets/groups.component.mjs +5 -2
- package/esm2020/sub-assets/sub-assets.component.mjs +7 -2
- package/esm2020/sub-assets/sub-assets.service.mjs +22 -10
- package/esm2020/tenants/tenant-list/tenant-list.component.mjs +12 -7
- package/esm2020/upgrade/ng1/downgraded.services.mjs +3 -2
- package/esm2020/upgrade/ng1/index.mjs +4 -3
- package/esm2020/widgets/cockpit/index.mjs +1 -1
- package/esm2020/widgets/device-management/index.mjs +1 -1
- package/fesm2015/c8y-ngx-components-assets-navigator.mjs +10 -3
- package/fesm2015/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-auth-configuration.mjs +7 -4
- package/fesm2015/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-cockpit-config.mjs +3 -3
- package/fesm2015/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs +35 -10
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-ecosystem.mjs +8 -8
- package/fesm2015/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-files-repository.mjs +6 -3
- package/fesm2015/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-location.mjs +20 -13
- package/fesm2015/c8y-ngx-components-location.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-map.mjs +174 -142
- package/fesm2015/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs +2 -2
- package/fesm2015/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs +1 -1
- package/fesm2015/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-register-device.mjs +3 -3
- package/fesm2015/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-replace-device.mjs +16 -8
- package/fesm2015/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-reports.mjs +2 -2
- package/fesm2015/c8y-ngx-components-reports.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-repository-configuration.mjs +13 -5
- package/fesm2015/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-sms-gateway.mjs +6 -6
- package/fesm2015/c8y-ngx-components-sms-gateway.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-sub-assets.mjs +43 -18
- package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-tenants.mjs +11 -6
- package/fesm2015/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-upgrade.mjs +4 -2
- package/fesm2015/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-widgets-cockpit.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components-widgets-device-management.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components.mjs +126 -29
- package/fesm2015/c8y-ngx-components.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-assets-navigator.mjs +10 -3
- package/fesm2020/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-auth-configuration.mjs +7 -4
- package/fesm2020/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-cockpit-config.mjs +3 -3
- package/fesm2020/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs +35 -10
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-ecosystem.mjs +8 -8
- package/fesm2020/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-files-repository.mjs +6 -3
- package/fesm2020/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-location.mjs +20 -13
- package/fesm2020/c8y-ngx-components-location.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-map.mjs +174 -142
- package/fesm2020/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs +2 -2
- package/fesm2020/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs +1 -1
- package/fesm2020/c8y-ngx-components-protocol-lwm2m-components-configuration.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-register-device.mjs +3 -3
- package/fesm2020/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-replace-device.mjs +16 -8
- package/fesm2020/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-reports.mjs +2 -2
- package/fesm2020/c8y-ngx-components-reports.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-repository-configuration.mjs +13 -5
- package/fesm2020/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-sms-gateway.mjs +6 -6
- package/fesm2020/c8y-ngx-components-sms-gateway.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-sub-assets.mjs +43 -18
- package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-tenants.mjs +11 -6
- package/fesm2020/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-upgrade.mjs +4 -2
- package/fesm2020/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-widgets-cockpit.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-widgets-device-management.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components.mjs +126 -29
- package/fesm2020/c8y-ngx-components.mjs.map +1 -1
- package/locales/locales.pot +3 -0
- package/location/location.component.d.ts +2 -2
- package/map/cluster-map.component.d.ts +3 -1
- package/map/map-status.component.d.ts +12 -1
- package/map/map.component.d.ts +1 -1
- package/map/map.model.d.ts +0 -1
- package/map/map.service.d.ts +6 -0
- package/package.json +1 -1
- package/replace-device/replace-device.service.d.ts +3 -1
- package/tenants/tenant-list/tenant-list.component.d.ts +4 -2
- package/upgrade/ng1/downgraded.services.d.ts +1 -0
- package/widgets/cockpit/index.d.ts +2 -1
- package/widgets/device-management/index.d.ts +2 -1
|
@@ -1089,7 +1089,7 @@ const MESSAGES = {
|
|
|
1089
1089
|
'^Can not activate a certificate which is either expired or not yet valid$': {
|
|
1090
1090
|
gettext: gettext('Cannot activate a certificate which is either expired or not yet valid.')
|
|
1091
1091
|
},
|
|
1092
|
-
'^Cannot add certificate - certificate with (.+?) fingerprint already exists. : Certificate with (.+?) fingerprint already exists
|
|
1092
|
+
'^Cannot add certificate - certificate with (.+?) fingerprint already exists. : Certificate with (.+?) fingerprint already exists.$': {
|
|
1093
1093
|
gettext: gettext('Could not add certificate. Certificate with {{fingerprint}} fingerprint already exists.'),
|
|
1094
1094
|
placeholders: {
|
|
1095
1095
|
fingerprint: '$1'
|
|
@@ -1391,7 +1391,7 @@ const MESSAGES = {
|
|
|
1391
1391
|
applicationId: '$2'
|
|
1392
1392
|
}
|
|
1393
1393
|
},
|
|
1394
|
-
'^Http status code: 404\n{error="options/Not Found",message="Unable to find option by given key: sigfox-agent/provider.token",info="https://www.cumulocity.com/guides/reference-guide/#error_reporting",details="null"}': {
|
|
1394
|
+
'^Http status code: 404\n{error="options/Not Found",message="Unable to find option by given key: sigfox-agent/provider.token",info="https://www.cumulocity.com/guides/reference-guide/#error_reporting",details="null"}$': {
|
|
1395
1395
|
gettext: gettext('Unable to find option by given key: sigfox-agent/provider.token')
|
|
1396
1396
|
},
|
|
1397
1397
|
'^Failed to delete application. : Cannot remove application assigned to other tenants.$': {
|
|
@@ -1512,7 +1512,7 @@ const MESSAGES = {
|
|
|
1512
1512
|
'^Inventory Role removed$': {
|
|
1513
1513
|
gettext: gettext('Inventory role removed')
|
|
1514
1514
|
},
|
|
1515
|
-
'^Inventory Role (.+?) removed': {
|
|
1515
|
+
'^Inventory Role (.+?) removed$': {
|
|
1516
1516
|
gettext: gettext('Inventory role "{{name}}" deleted.'),
|
|
1517
1517
|
placeholders: {
|
|
1518
1518
|
name: '$1'
|
|
@@ -1521,16 +1521,16 @@ const MESSAGES = {
|
|
|
1521
1521
|
'^Inventory Role updated$': {
|
|
1522
1522
|
gettext: gettext('Inventory role updated')
|
|
1523
1523
|
},
|
|
1524
|
-
'^Inventory Role (.+?) updated': {
|
|
1524
|
+
'^Inventory Role (.+?) updated$': {
|
|
1525
1525
|
gettext: gettext('Inventory role "{{name}}" updated.'),
|
|
1526
1526
|
placeholders: {
|
|
1527
1527
|
name: '$1'
|
|
1528
1528
|
}
|
|
1529
1529
|
},
|
|
1530
|
-
'^I/O error: Connection refused; nested exception is Connection refused : Connection refused': {
|
|
1530
|
+
'^I/O error: Connection refused; nested exception is Connection refused : Connection refused$': {
|
|
1531
1531
|
gettext: gettext('Connection refused')
|
|
1532
1532
|
},
|
|
1533
|
-
'^I/O error: Read timed out; nested exception is Read timed out : Read timed out': {
|
|
1533
|
+
'^I/O error: Read timed out; nested exception is Read timed out : Read timed out$': {
|
|
1534
1534
|
gettext: gettext('Read timed out')
|
|
1535
1535
|
},
|
|
1536
1536
|
'^Log file requested$': {
|
|
@@ -1606,7 +1606,7 @@ const MESSAGES = {
|
|
|
1606
1606
|
'^Operation updated$': {
|
|
1607
1607
|
gettext: gettext('Operation updated.')
|
|
1608
1608
|
},
|
|
1609
|
-
"^Operation created: status='(.+?)'
|
|
1609
|
+
"^Operation created: status='(.+?)'.$": {
|
|
1610
1610
|
gettext: gettext('Operation created: status: "{{ status | translate }}".'),
|
|
1611
1611
|
placeholders: {
|
|
1612
1612
|
status: '$1'
|
|
@@ -1630,13 +1630,13 @@ const MESSAGES = {
|
|
|
1630
1630
|
option: '$1'
|
|
1631
1631
|
}
|
|
1632
1632
|
},
|
|
1633
|
-
'^Owner field error. : Cannot introduce cyclic dependency
|
|
1633
|
+
'^Owner field error. : Cannot introduce cyclic dependency.$': {
|
|
1634
1634
|
gettext: gettext('Could not introduce cyclic ownership dependency.')
|
|
1635
1635
|
},
|
|
1636
1636
|
'^Password change is temporary blocked.$': {
|
|
1637
1637
|
gettext: gettext('Password change is temporarily blocked.')
|
|
1638
1638
|
},
|
|
1639
|
-
'^Password cipher does not match': {
|
|
1639
|
+
'^Password cipher does not match$': {
|
|
1640
1640
|
gettext: gettext('Password cipher does not match.')
|
|
1641
1641
|
},
|
|
1642
1642
|
'^Platform application cannot be added to, nor removed from any tenant.$': {
|
|
@@ -1645,7 +1645,7 @@ const MESSAGES = {
|
|
|
1645
1645
|
'^Private key must be provided in KEY_PAIR credentials$': {
|
|
1646
1646
|
gettext: gettext('Private key must be provided when "Public/private keys" option is selected.')
|
|
1647
1647
|
},
|
|
1648
|
-
'^Private key cipher does not match': {
|
|
1648
|
+
'^Private key cipher does not match$': {
|
|
1649
1649
|
gettext: gettext('Private key cipher does not match')
|
|
1650
1650
|
},
|
|
1651
1651
|
'^Protocol "(.+?)" does not support "(.+?)" credentials type$': {
|
|
@@ -1682,13 +1682,13 @@ const MESSAGES = {
|
|
|
1682
1682
|
id: '$1'
|
|
1683
1683
|
}
|
|
1684
1684
|
},
|
|
1685
|
-
'^Retrieve configuration snapshot from device (.+?)': {
|
|
1685
|
+
'^Retrieve configuration snapshot from device (.+?)$': {
|
|
1686
1686
|
gettext: gettext('Retrieve configuration snapshot from device {{deviceName}}'),
|
|
1687
1687
|
placeholders: {
|
|
1688
1688
|
deviceName: '$1'
|
|
1689
1689
|
}
|
|
1690
1690
|
},
|
|
1691
|
-
'^Retrieve (.+?) configuration snapshot from device (.+?)': {
|
|
1691
|
+
'^Retrieve (.+?) configuration snapshot from device (.+?)$': {
|
|
1692
1692
|
gettext: gettext('Retrieve {{configurationType}} configuration snapshot from device {{deviceName}}'),
|
|
1693
1693
|
placeholders: {
|
|
1694
1694
|
configurationType: '$1',
|
|
@@ -1702,7 +1702,7 @@ const MESSAGES = {
|
|
|
1702
1702
|
scaleNumber: '$2'
|
|
1703
1703
|
}
|
|
1704
1704
|
},
|
|
1705
|
-
'^Send configuration snapshot (.+?) of configuration type (.+?) to device (.+?)': {
|
|
1705
|
+
'^Send configuration snapshot (.+?) of configuration type (.+?) to device (.+?)$': {
|
|
1706
1706
|
gettext: gettext('Send configuration snapshot {{snapshotName}} of configuration type {{configurationType}} to device {{deviceName}}'),
|
|
1707
1707
|
placeholders: {
|
|
1708
1708
|
snapshotName: '$1',
|
|
@@ -1710,7 +1710,7 @@ const MESSAGES = {
|
|
|
1710
1710
|
deviceName: '$3'
|
|
1711
1711
|
}
|
|
1712
1712
|
},
|
|
1713
|
-
'^Send configuration snapshot (.+?) to device (.+?)': {
|
|
1713
|
+
'^Send configuration snapshot (.+?) to device (.+?)$': {
|
|
1714
1714
|
gettext: gettext('Send configuration snapshot {{snapshotName}} to device {{deviceName}}'),
|
|
1715
1715
|
placeholders: {
|
|
1716
1716
|
snapshotName: '$1',
|
|
@@ -1938,25 +1938,25 @@ const MESSAGES = {
|
|
|
1938
1938
|
inventoryAssignment: '$1'
|
|
1939
1939
|
}
|
|
1940
1940
|
},
|
|
1941
|
-
'applications \\[(.+?)\\] added
|
|
1941
|
+
'applications \\[(.+?)\\] added': {
|
|
1942
1942
|
gettext: gettext('applications [{{applicationsList}}] added'),
|
|
1943
1943
|
placeholders: {
|
|
1944
1944
|
applicationsList: '$1'
|
|
1945
1945
|
}
|
|
1946
1946
|
},
|
|
1947
|
-
'applications \\[(.+?)\\] removed
|
|
1947
|
+
'applications \\[(.+?)\\] removed': {
|
|
1948
1948
|
gettext: gettext('applications [{{applicationsList}}] removed'),
|
|
1949
1949
|
placeholders: {
|
|
1950
1950
|
applicationsList: '$1'
|
|
1951
1951
|
}
|
|
1952
1952
|
},
|
|
1953
|
-
'global roles \\[(.+?)\\] added
|
|
1953
|
+
'global roles \\[(.+?)\\] added': {
|
|
1954
1954
|
gettext: gettext('global roles [{{globalRolesList}}] added'),
|
|
1955
1955
|
placeholders: {
|
|
1956
1956
|
globalRolesList: '$1'
|
|
1957
1957
|
}
|
|
1958
1958
|
},
|
|
1959
|
-
'global roles \\[(.+?)\\] removed
|
|
1959
|
+
'global roles \\[(.+?)\\] removed': {
|
|
1960
1960
|
gettext: gettext('global roles [{{globalRolesList}}] removed'),
|
|
1961
1961
|
placeholders: {
|
|
1962
1962
|
globalRolesList: '$1'
|
|
@@ -2005,7 +2005,7 @@ const MESSAGES = {
|
|
|
2005
2005
|
'^You have reached devices limit. No more devices can be registered.$': {
|
|
2006
2006
|
gettext: gettext('You reached devices limit. No more devices can be registered.')
|
|
2007
2007
|
},
|
|
2008
|
-
'^(.+) succeeded for volume "(.+)"': {
|
|
2008
|
+
'^(.+) succeeded for volume "(.+)"$': {
|
|
2009
2009
|
gettext: gettext('Operation "{{operation}}" succeeded for volume "{{volume}}".'),
|
|
2010
2010
|
placeholders: {
|
|
2011
2011
|
operation: '$1',
|
|
@@ -2689,7 +2689,7 @@ const MESSAGES = {
|
|
|
2689
2689
|
'^This command returns a list of shell commands with description that can be created for the Lwm2m device connector\\.$': {
|
|
2690
2690
|
gettext: gettext('This command returns a list of shell commands with description that can be created for the LWM2M device connector.')
|
|
2691
2691
|
},
|
|
2692
|
-
'^The following operations are supported
|
|
2692
|
+
'^The following operations are supported:$': {
|
|
2693
2693
|
gettext: gettext('The following operations are supported:')
|
|
2694
2694
|
},
|
|
2695
2695
|
'^PSK template$': {
|
|
@@ -4720,6 +4720,22 @@ class FilesService {
|
|
|
4720
4720
|
const allowedExts = this.extractFileExtensions(accept);
|
|
4721
4721
|
return filesExts.every(ext => allowedExts.includes(ext));
|
|
4722
4722
|
}
|
|
4723
|
+
/**
|
|
4724
|
+
* Checks if file names have allowed extension.
|
|
4725
|
+
* If the accept parameter is not specified, all extensions are accepted.
|
|
4726
|
+
* @param fileNames The file names to check.
|
|
4727
|
+
* @param accept String of comma separated file extensions and generic types ([GENERIC_FILE_TYPE]{@link GENERIC_FILE_TYPE}), e.g. .zip,.7z,excel.
|
|
4728
|
+
* @returns Returns true if each file has allowed extension.
|
|
4729
|
+
*/
|
|
4730
|
+
fileNamesHaveValidExtension(fileNames, accept) {
|
|
4731
|
+
if (!accept) {
|
|
4732
|
+
return true;
|
|
4733
|
+
}
|
|
4734
|
+
fileNames = Array.isArray(fileNames) ? fileNames : [fileNames];
|
|
4735
|
+
const filesExts = fileNames.map((file) => this.getFileExtension(file)?.toLowerCase());
|
|
4736
|
+
const allowedExts = this.extractFileExtensions(accept);
|
|
4737
|
+
return filesExts.every(ext => allowedExts.includes(ext));
|
|
4738
|
+
}
|
|
4723
4739
|
/**
|
|
4724
4740
|
* Checks if each file has a valid filename length.
|
|
4725
4741
|
* @param files Files to check.
|
|
@@ -4732,11 +4748,11 @@ class FilesService {
|
|
|
4732
4748
|
}
|
|
4733
4749
|
/**
|
|
4734
4750
|
* Extracts the file extension.
|
|
4735
|
-
* @param
|
|
4751
|
+
* @param fileOrFileName File or name of file from which the extension should be extracted.
|
|
4736
4752
|
* @returns Returns the file extension or undefined if the file has no extension.
|
|
4737
4753
|
*/
|
|
4738
|
-
getFileExtension(
|
|
4739
|
-
const fileNameAndFileExt =
|
|
4754
|
+
getFileExtension(fileOrFileName) {
|
|
4755
|
+
const fileNameAndFileExt = (typeof fileOrFileName === 'string' ? fileOrFileName : fileOrFileName.name).split('.');
|
|
4740
4756
|
if (fileNameAndFileExt.length === 1) {
|
|
4741
4757
|
// no file ext
|
|
4742
4758
|
return undefined;
|
|
@@ -5472,7 +5488,7 @@ class Permissions {
|
|
|
5472
5488
|
* Checks if the current user has write permissions for the given mo.
|
|
5473
5489
|
* (either through global role, individual device permissions or via inventory roles).
|
|
5474
5490
|
*
|
|
5475
|
-
* @param
|
|
5491
|
+
* @param roleIds The array of role ids to check if the current user have at least one of them.
|
|
5476
5492
|
* @param {IManagedObject | IIdentified} mo The managed object for which we are checking whether the user has access.
|
|
5477
5493
|
* @param {CanEditConfig} config A configuration object that can take the following values:
|
|
5478
5494
|
* - `skipRolesCheck`: `boolean` - skips roles check,
|
|
@@ -5548,6 +5564,73 @@ class Permissions {
|
|
|
5548
5564
|
return false;
|
|
5549
5565
|
}
|
|
5550
5566
|
}
|
|
5567
|
+
Permissions.ROLE_ADVANCED_SOFTWARE_ADMIN = 'ROLE_ADVANCED_SOFTWARE_ADMIN';
|
|
5568
|
+
Permissions.ROLE_ADVANCED_SOFTWARE_READ = 'ROLE_ADVANCED_SOFTWARE_READ';
|
|
5569
|
+
Permissions.ROLE_ALARM_ADMIN = 'ROLE_ALARM_ADMIN';
|
|
5570
|
+
Permissions.ROLE_ALARM_READ = 'ROLE_ALARM_READ';
|
|
5571
|
+
Permissions.ROLE_ANALYTICSBUILDER_READ = 'ROLE_ANALYTICSBUILDER_READ';
|
|
5572
|
+
Permissions.ROLE_APPLICATION_MANAGEMENT_ADMIN = 'ROLE_APPLICATION_MANAGEMENT_ADMIN';
|
|
5573
|
+
Permissions.ROLE_APPLICATION_MANAGEMENT_READ = 'ROLE_APPLICATION_MANAGEMENT_READ';
|
|
5574
|
+
Permissions.ROLE_AUDIT_ADMIN = 'ROLE_AUDIT_ADMIN';
|
|
5575
|
+
Permissions.ROLE_AUDIT_READ = 'ROLE_AUDIT_READ';
|
|
5576
|
+
Permissions.ROLE_BINARY_ADMIN = 'ROLE_BINARY_ADMIN';
|
|
5577
|
+
Permissions.ROLE_BINARY_CREATE = 'ROLE_BINARY_CREATE';
|
|
5578
|
+
Permissions.ROLE_BINARY_READ = 'ROLE_BINARY_READ';
|
|
5579
|
+
Permissions.ROLE_BULK_OPERATION_ADMIN = 'ROLE_BULK_OPERATION_ADMIN';
|
|
5580
|
+
Permissions.ROLE_BULK_OPERATION_READ = 'ROLE_BULK_OPERATION_READ';
|
|
5581
|
+
Permissions.ROLE_CEP_MANAGEMENT_ADMIN = 'ROLE_CEP_MANAGEMENT_ADMIN';
|
|
5582
|
+
Permissions.ROLE_CEP_MANAGEMENT_READ = 'ROLE_CEP_MANAGEMENT_READ';
|
|
5583
|
+
Permissions.ROLE_DATA_BROKER_ADMIN = 'ROLE_DATA_BROKER_ADMIN';
|
|
5584
|
+
Permissions.ROLE_DATA_BROKER_READ = 'ROLE_DATA_BROKER_READ';
|
|
5585
|
+
Permissions.ROLE_DEVICE_CONTROL_ADMIN = 'ROLE_DEVICE_CONTROL_ADMIN';
|
|
5586
|
+
Permissions.ROLE_DEVICE_CONTROL_READ = 'ROLE_DEVICE_CONTROL_READ';
|
|
5587
|
+
Permissions.ROLE_EMAIL_CREATE = 'ROLE_EMAIL_CREATE';
|
|
5588
|
+
Permissions.ROLE_EPLAPPS_READ = 'ROLE_EPLAPPS_READ';
|
|
5589
|
+
Permissions.ROLE_EVENT_ADMIN = 'ROLE_EVENT_ADMIN';
|
|
5590
|
+
Permissions.ROLE_EVENT_READ = 'ROLE_EVENT_READ';
|
|
5591
|
+
Permissions.ROLE_GENERIC_MQTT_ADMIN = 'ROLE_GENERIC_MQTT_ADMIN';
|
|
5592
|
+
Permissions.ROLE_IDENTITY_ADMIN = 'ROLE_IDENTITY_ADMIN';
|
|
5593
|
+
Permissions.ROLE_IDENTITY_READ = 'ROLE_IDENTITY_READ';
|
|
5594
|
+
Permissions.ROLE_INVENTORY_ADMIN = 'ROLE_INVENTORY_ADMIN';
|
|
5595
|
+
Permissions.ROLE_INVENTORY_CREATE = 'ROLE_INVENTORY_CREATE';
|
|
5596
|
+
Permissions.ROLE_INVENTORY_READ = 'ROLE_INVENTORY_READ';
|
|
5597
|
+
Permissions.ROLE_MACHINE_LEARNING_READ = 'ROLE_MACHINE_LEARNING_READ';
|
|
5598
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN = 'ROLE_MANAGED_OBJECT_ADMIN';
|
|
5599
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE = 'ROLE_MANAGED_OBJECT_CREATE';
|
|
5600
|
+
Permissions.ROLE_MANAGED_OBJECT_READ = 'ROLE_MANAGED_OBJECT_READ';
|
|
5601
|
+
Permissions.ROLE_MEASUREMENT_ADMIN = 'ROLE_MEASUREMENT_ADMIN';
|
|
5602
|
+
Permissions.ROLE_MEASUREMENT_READ = 'ROLE_MEASUREMENT_READ';
|
|
5603
|
+
Permissions.ROLE_MQTT_CONNECT_ADMIN = 'ROLE_MQTT_CONNECT_ADMIN';
|
|
5604
|
+
Permissions.ROLE_MQTT_SERVICE_ADMIN = 'ROLE_MQTT_SERVICE_ADMIN';
|
|
5605
|
+
Permissions.ROLE_NOTIFICATION_2_ADMIN = 'ROLE_NOTIFICATION_2_ADMIN';
|
|
5606
|
+
Permissions.ROLE_OPTION_MANAGEMENT_ADMIN = 'ROLE_OPTION_MANAGEMENT_ADMIN';
|
|
5607
|
+
Permissions.ROLE_OPTION_MANAGEMENT_READ = 'ROLE_OPTION_MANAGEMENT_READ';
|
|
5608
|
+
Permissions.ROLE_PROVISIONING_CREATE = 'ROLE_PROVISIONING_CREATE';
|
|
5609
|
+
Permissions.ROLE_PROVISIONING_READ = 'ROLE_PROVISIONING_READ';
|
|
5610
|
+
Permissions.ROLE_PROVISIONING_UPDATE = 'ROLE_PROVISIONING_UPDATE';
|
|
5611
|
+
Permissions.ROLE_REMOTE_ACCESS_ADMIN = 'ROLE_REMOTE_ACCESS_ADMIN';
|
|
5612
|
+
Permissions.ROLE_RETENTION_RULE_ADMIN = 'ROLE_RETENTION_RULE_ADMIN';
|
|
5613
|
+
Permissions.ROLE_RETENTION_RULE_READ = 'ROLE_RETENTION_RULE_READ';
|
|
5614
|
+
Permissions.ROLE_SCHEDULE_REPORT_ADMIN = 'ROLE_SCHEDULE_REPORT_ADMIN';
|
|
5615
|
+
Permissions.ROLE_SIMULATOR_ADMIN = 'ROLE_SIMULATOR_ADMIN';
|
|
5616
|
+
Permissions.ROLE_SMARTGROUP_ADMIN = 'ROLE_SMARTGROUP_ADMIN';
|
|
5617
|
+
Permissions.ROLE_SMARTGROUP_CREATE = 'ROLE_SMARTGROUP_CREATE';
|
|
5618
|
+
Permissions.ROLE_SMARTGROUP_UPDATE = 'ROLE_SMARTGROUP_UPDATE';
|
|
5619
|
+
Permissions.ROLE_SMARTRULE_ADMIN = 'ROLE_SMARTRULE_ADMIN';
|
|
5620
|
+
Permissions.ROLE_SMARTRULE_READ = 'ROLE_SMARTRULE_READ';
|
|
5621
|
+
Permissions.ROLE_SMS_ADMIN = 'ROLE_SMS_ADMIN';
|
|
5622
|
+
Permissions.ROLE_SMS_READ = 'ROLE_SMS_READ';
|
|
5623
|
+
Permissions.ROLE_TENANT_ADMIN = 'ROLE_TENANT_ADMIN';
|
|
5624
|
+
Permissions.ROLE_TENANT_MANAGEMENT_ADMIN = 'ROLE_TENANT_MANAGEMENT_ADMIN';
|
|
5625
|
+
Permissions.ROLE_TENANT_MANAGEMENT_CREATE = 'ROLE_TENANT_MANAGEMENT_CREATE';
|
|
5626
|
+
Permissions.ROLE_TENANT_MANAGEMENT_READ = 'ROLE_TENANT_MANAGEMENT_READ';
|
|
5627
|
+
Permissions.ROLE_TENANT_MANAGEMENT_UPDATE = 'ROLE_TENANT_MANAGEMENT_UPDATE';
|
|
5628
|
+
Permissions.ROLE_TENANT_STATISTICS_READ = 'ROLE_TENANT_STATISTICS_READ';
|
|
5629
|
+
Permissions.ROLE_USER_MANAGEMENT_ADMIN = 'ROLE_USER_MANAGEMENT_ADMIN';
|
|
5630
|
+
Permissions.ROLE_USER_MANAGEMENT_CREATE = 'ROLE_USER_MANAGEMENT_CREATE';
|
|
5631
|
+
Permissions.ROLE_USER_MANAGEMENT_OWN_ADMIN = 'ROLE_USER_MANAGEMENT_OWN_ADMIN';
|
|
5632
|
+
Permissions.ROLE_USER_MANAGEMENT_OWN_READ = 'ROLE_USER_MANAGEMENT_OWN_READ';
|
|
5633
|
+
Permissions.ROLE_USER_MANAGEMENT_READ = 'ROLE_USER_MANAGEMENT_READ';
|
|
5551
5634
|
Permissions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Permissions, deps: [{ token: AppStateService }, { token: i1$1.InventoryService }, { token: i1$1.UserService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5552
5635
|
Permissions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Permissions, providedIn: 'root' });
|
|
5553
5636
|
__decorate([
|
|
@@ -6419,7 +6502,14 @@ class UserPreferencesService {
|
|
|
6419
6502
|
* @returns A proper storage.
|
|
6420
6503
|
*/
|
|
6421
6504
|
getStorage(user) {
|
|
6422
|
-
return this.user.hasAllRoles(user, [
|
|
6505
|
+
return this.user.hasAllRoles(user, [
|
|
6506
|
+
Permissions.ROLE_INVENTORY_READ,
|
|
6507
|
+
Permissions.ROLE_INVENTORY_ADMIN
|
|
6508
|
+
]) ||
|
|
6509
|
+
this.user.hasAllRoles(user, [
|
|
6510
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
6511
|
+
Permissions.ROLE_MANAGED_OBJECT_READ
|
|
6512
|
+
])
|
|
6423
6513
|
? this.storage.inventory
|
|
6424
6514
|
: this.storage.local;
|
|
6425
6515
|
}
|
|
@@ -6651,7 +6741,12 @@ class GlobalConfigService {
|
|
|
6651
6741
|
this.fragmentTypeMapping = {
|
|
6652
6742
|
c8y_Software: 'c8y_SoftwareAsGlobal',
|
|
6653
6743
|
c8y_Firmware: 'c8y_FirmwareAsGlobal',
|
|
6654
|
-
c8y_ConfigurationDump: 'c8y_ConfigurationAsGlobal'
|
|
6744
|
+
c8y_ConfigurationDump: 'c8y_ConfigurationAsGlobal',
|
|
6745
|
+
c8y_DeviceShellTemplate: 'c8y_ShellTemplateAsGlobal',
|
|
6746
|
+
c8y_ModbusDeviceType: 'c8y_FieldbusAsGlobal',
|
|
6747
|
+
c8y_CANopenDeviceType: 'c8y_CANOpenAsGlobal',
|
|
6748
|
+
c8y_LoraDeviceType: 'c8y_LoraAsGlobal',
|
|
6749
|
+
c8y_SigfoxDeviceType: 'c8y_SigfoxAsGlobal'
|
|
6655
6750
|
};
|
|
6656
6751
|
this.cache = undefined;
|
|
6657
6752
|
}
|
|
@@ -6747,7 +6842,7 @@ class TenantUiService {
|
|
|
6747
6842
|
this.userService = userService;
|
|
6748
6843
|
this.appStateService = appStateService;
|
|
6749
6844
|
this.MANAGEMENT = 'management';
|
|
6750
|
-
this.ROLE_TENANT_MANAGEMENT_READ =
|
|
6845
|
+
this.ROLE_TENANT_MANAGEMENT_READ = Permissions.ROLE_TENANT_MANAGEMENT_READ;
|
|
6751
6846
|
}
|
|
6752
6847
|
/**
|
|
6753
6848
|
* Returns current tenant
|
|
@@ -10574,7 +10669,7 @@ class SetupService {
|
|
|
10574
10669
|
this.ui = ui;
|
|
10575
10670
|
this.pluginsResolve = pluginsResolve;
|
|
10576
10671
|
this.skipSetup$ = new BehaviorSubject(false);
|
|
10577
|
-
this.isSetupNeeded$ = this.pluginsResolve.allPluginsLoaded$.pipe(filter(loaded => loaded), switchMap(() => this.ui.isOwnerOfApplication$()), switchMap(isOwner => {
|
|
10672
|
+
this.isSetupNeeded$ = this.pluginsResolve.allPluginsLoaded$.pipe(filter(loaded => loaded), switchMap(() => this.ui.currentUser.pipe(filter(user => !!user))), switchMap(() => this.ui.isOwnerOfApplication$()), switchMap(isOwner => {
|
|
10578
10673
|
if (!isOwner) {
|
|
10579
10674
|
return of([]);
|
|
10580
10675
|
}
|
|
@@ -20146,6 +20241,7 @@ class DropAreaComponent {
|
|
|
20146
20241
|
this.clearErrors();
|
|
20147
20242
|
this.dropped.emit(null);
|
|
20148
20243
|
this.onChange(null);
|
|
20244
|
+
this.onTouched();
|
|
20149
20245
|
this.cd.markForCheck();
|
|
20150
20246
|
}
|
|
20151
20247
|
writeValue(value) {
|
|
@@ -20165,6 +20261,7 @@ class DropAreaComponent {
|
|
|
20165
20261
|
this.onTouched = fn;
|
|
20166
20262
|
}
|
|
20167
20263
|
async onFilesSelected(files) {
|
|
20264
|
+
this.onTouched();
|
|
20168
20265
|
const hasValidNameLength = this.filesService.checkMaxLength(files);
|
|
20169
20266
|
if (!hasValidNameLength) {
|
|
20170
20267
|
this.onFileInvalidNameLength();
|
|
@@ -21871,7 +21968,7 @@ class SupportOutletComponent {
|
|
|
21871
21968
|
const textWithCompany = gettext('You are about to block a support user from {{companyName}} from accessing your tenant to help you with your issue.');
|
|
21872
21969
|
const textWithoutCompany = gettext('You are about to block a support user from accessing your tenant to help you with your issue.');
|
|
21873
21970
|
const { data: currentUser } = await this.userService.current();
|
|
21874
|
-
const isTenantAdmin = this.userService.hasRole(currentUser,
|
|
21971
|
+
const isTenantAdmin = this.userService.hasRole(currentUser, Permissions.ROLE_TENANT_ADMIN);
|
|
21875
21972
|
const tenantAdminNote = gettext('Deactivating support access as tenant admin will disable all other support requests on your tenant.');
|
|
21876
21973
|
const finalQuestion = gettext('Do you want to proceed?');
|
|
21877
21974
|
const body = [
|