@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
|
@@ -1116,7 +1116,7 @@ const MESSAGES = {
|
|
|
1116
1116
|
'^Can not activate a certificate which is either expired or not yet valid$': {
|
|
1117
1117
|
gettext: gettext('Cannot activate a certificate which is either expired or not yet valid.')
|
|
1118
1118
|
},
|
|
1119
|
-
'^Cannot add certificate - certificate with (.+?) fingerprint already exists. : Certificate with (.+?) fingerprint already exists
|
|
1119
|
+
'^Cannot add certificate - certificate with (.+?) fingerprint already exists. : Certificate with (.+?) fingerprint already exists.$': {
|
|
1120
1120
|
gettext: gettext('Could not add certificate. Certificate with {{fingerprint}} fingerprint already exists.'),
|
|
1121
1121
|
placeholders: {
|
|
1122
1122
|
fingerprint: '$1'
|
|
@@ -1418,7 +1418,7 @@ const MESSAGES = {
|
|
|
1418
1418
|
applicationId: '$2'
|
|
1419
1419
|
}
|
|
1420
1420
|
},
|
|
1421
|
-
'^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"}': {
|
|
1421
|
+
'^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"}$': {
|
|
1422
1422
|
gettext: gettext('Unable to find option by given key: sigfox-agent/provider.token')
|
|
1423
1423
|
},
|
|
1424
1424
|
'^Failed to delete application. : Cannot remove application assigned to other tenants.$': {
|
|
@@ -1539,7 +1539,7 @@ const MESSAGES = {
|
|
|
1539
1539
|
'^Inventory Role removed$': {
|
|
1540
1540
|
gettext: gettext('Inventory role removed')
|
|
1541
1541
|
},
|
|
1542
|
-
'^Inventory Role (.+?) removed': {
|
|
1542
|
+
'^Inventory Role (.+?) removed$': {
|
|
1543
1543
|
gettext: gettext('Inventory role "{{name}}" deleted.'),
|
|
1544
1544
|
placeholders: {
|
|
1545
1545
|
name: '$1'
|
|
@@ -1548,16 +1548,16 @@ const MESSAGES = {
|
|
|
1548
1548
|
'^Inventory Role updated$': {
|
|
1549
1549
|
gettext: gettext('Inventory role updated')
|
|
1550
1550
|
},
|
|
1551
|
-
'^Inventory Role (.+?) updated': {
|
|
1551
|
+
'^Inventory Role (.+?) updated$': {
|
|
1552
1552
|
gettext: gettext('Inventory role "{{name}}" updated.'),
|
|
1553
1553
|
placeholders: {
|
|
1554
1554
|
name: '$1'
|
|
1555
1555
|
}
|
|
1556
1556
|
},
|
|
1557
|
-
'^I/O error: Connection refused; nested exception is Connection refused : Connection refused': {
|
|
1557
|
+
'^I/O error: Connection refused; nested exception is Connection refused : Connection refused$': {
|
|
1558
1558
|
gettext: gettext('Connection refused')
|
|
1559
1559
|
},
|
|
1560
|
-
'^I/O error: Read timed out; nested exception is Read timed out : Read timed out': {
|
|
1560
|
+
'^I/O error: Read timed out; nested exception is Read timed out : Read timed out$': {
|
|
1561
1561
|
gettext: gettext('Read timed out')
|
|
1562
1562
|
},
|
|
1563
1563
|
'^Log file requested$': {
|
|
@@ -1633,7 +1633,7 @@ const MESSAGES = {
|
|
|
1633
1633
|
'^Operation updated$': {
|
|
1634
1634
|
gettext: gettext('Operation updated.')
|
|
1635
1635
|
},
|
|
1636
|
-
"^Operation created: status='(.+?)'
|
|
1636
|
+
"^Operation created: status='(.+?)'.$": {
|
|
1637
1637
|
gettext: gettext('Operation created: status: "{{ status | translate }}".'),
|
|
1638
1638
|
placeholders: {
|
|
1639
1639
|
status: '$1'
|
|
@@ -1657,13 +1657,13 @@ const MESSAGES = {
|
|
|
1657
1657
|
option: '$1'
|
|
1658
1658
|
}
|
|
1659
1659
|
},
|
|
1660
|
-
'^Owner field error. : Cannot introduce cyclic dependency
|
|
1660
|
+
'^Owner field error. : Cannot introduce cyclic dependency.$': {
|
|
1661
1661
|
gettext: gettext('Could not introduce cyclic ownership dependency.')
|
|
1662
1662
|
},
|
|
1663
1663
|
'^Password change is temporary blocked.$': {
|
|
1664
1664
|
gettext: gettext('Password change is temporarily blocked.')
|
|
1665
1665
|
},
|
|
1666
|
-
'^Password cipher does not match': {
|
|
1666
|
+
'^Password cipher does not match$': {
|
|
1667
1667
|
gettext: gettext('Password cipher does not match.')
|
|
1668
1668
|
},
|
|
1669
1669
|
'^Platform application cannot be added to, nor removed from any tenant.$': {
|
|
@@ -1672,7 +1672,7 @@ const MESSAGES = {
|
|
|
1672
1672
|
'^Private key must be provided in KEY_PAIR credentials$': {
|
|
1673
1673
|
gettext: gettext('Private key must be provided when "Public/private keys" option is selected.')
|
|
1674
1674
|
},
|
|
1675
|
-
'^Private key cipher does not match': {
|
|
1675
|
+
'^Private key cipher does not match$': {
|
|
1676
1676
|
gettext: gettext('Private key cipher does not match')
|
|
1677
1677
|
},
|
|
1678
1678
|
'^Protocol "(.+?)" does not support "(.+?)" credentials type$': {
|
|
@@ -1709,13 +1709,13 @@ const MESSAGES = {
|
|
|
1709
1709
|
id: '$1'
|
|
1710
1710
|
}
|
|
1711
1711
|
},
|
|
1712
|
-
'^Retrieve configuration snapshot from device (.+?)': {
|
|
1712
|
+
'^Retrieve configuration snapshot from device (.+?)$': {
|
|
1713
1713
|
gettext: gettext('Retrieve configuration snapshot from device {{deviceName}}'),
|
|
1714
1714
|
placeholders: {
|
|
1715
1715
|
deviceName: '$1'
|
|
1716
1716
|
}
|
|
1717
1717
|
},
|
|
1718
|
-
'^Retrieve (.+?) configuration snapshot from device (.+?)': {
|
|
1718
|
+
'^Retrieve (.+?) configuration snapshot from device (.+?)$': {
|
|
1719
1719
|
gettext: gettext('Retrieve {{configurationType}} configuration snapshot from device {{deviceName}}'),
|
|
1720
1720
|
placeholders: {
|
|
1721
1721
|
configurationType: '$1',
|
|
@@ -1729,7 +1729,7 @@ const MESSAGES = {
|
|
|
1729
1729
|
scaleNumber: '$2'
|
|
1730
1730
|
}
|
|
1731
1731
|
},
|
|
1732
|
-
'^Send configuration snapshot (.+?) of configuration type (.+?) to device (.+?)': {
|
|
1732
|
+
'^Send configuration snapshot (.+?) of configuration type (.+?) to device (.+?)$': {
|
|
1733
1733
|
gettext: gettext('Send configuration snapshot {{snapshotName}} of configuration type {{configurationType}} to device {{deviceName}}'),
|
|
1734
1734
|
placeholders: {
|
|
1735
1735
|
snapshotName: '$1',
|
|
@@ -1737,7 +1737,7 @@ const MESSAGES = {
|
|
|
1737
1737
|
deviceName: '$3'
|
|
1738
1738
|
}
|
|
1739
1739
|
},
|
|
1740
|
-
'^Send configuration snapshot (.+?) to device (.+?)': {
|
|
1740
|
+
'^Send configuration snapshot (.+?) to device (.+?)$': {
|
|
1741
1741
|
gettext: gettext('Send configuration snapshot {{snapshotName}} to device {{deviceName}}'),
|
|
1742
1742
|
placeholders: {
|
|
1743
1743
|
snapshotName: '$1',
|
|
@@ -1965,25 +1965,25 @@ const MESSAGES = {
|
|
|
1965
1965
|
inventoryAssignment: '$1'
|
|
1966
1966
|
}
|
|
1967
1967
|
},
|
|
1968
|
-
'applications \\[(.+?)\\] added
|
|
1968
|
+
'applications \\[(.+?)\\] added': {
|
|
1969
1969
|
gettext: gettext('applications [{{applicationsList}}] added'),
|
|
1970
1970
|
placeholders: {
|
|
1971
1971
|
applicationsList: '$1'
|
|
1972
1972
|
}
|
|
1973
1973
|
},
|
|
1974
|
-
'applications \\[(.+?)\\] removed
|
|
1974
|
+
'applications \\[(.+?)\\] removed': {
|
|
1975
1975
|
gettext: gettext('applications [{{applicationsList}}] removed'),
|
|
1976
1976
|
placeholders: {
|
|
1977
1977
|
applicationsList: '$1'
|
|
1978
1978
|
}
|
|
1979
1979
|
},
|
|
1980
|
-
'global roles \\[(.+?)\\] added
|
|
1980
|
+
'global roles \\[(.+?)\\] added': {
|
|
1981
1981
|
gettext: gettext('global roles [{{globalRolesList}}] added'),
|
|
1982
1982
|
placeholders: {
|
|
1983
1983
|
globalRolesList: '$1'
|
|
1984
1984
|
}
|
|
1985
1985
|
},
|
|
1986
|
-
'global roles \\[(.+?)\\] removed
|
|
1986
|
+
'global roles \\[(.+?)\\] removed': {
|
|
1987
1987
|
gettext: gettext('global roles [{{globalRolesList}}] removed'),
|
|
1988
1988
|
placeholders: {
|
|
1989
1989
|
globalRolesList: '$1'
|
|
@@ -2032,7 +2032,7 @@ const MESSAGES = {
|
|
|
2032
2032
|
'^You have reached devices limit. No more devices can be registered.$': {
|
|
2033
2033
|
gettext: gettext('You reached devices limit. No more devices can be registered.')
|
|
2034
2034
|
},
|
|
2035
|
-
'^(.+) succeeded for volume "(.+)"': {
|
|
2035
|
+
'^(.+) succeeded for volume "(.+)"$': {
|
|
2036
2036
|
gettext: gettext('Operation "{{operation}}" succeeded for volume "{{volume}}".'),
|
|
2037
2037
|
placeholders: {
|
|
2038
2038
|
operation: '$1',
|
|
@@ -2716,7 +2716,7 @@ const MESSAGES = {
|
|
|
2716
2716
|
'^This command returns a list of shell commands with description that can be created for the Lwm2m device connector\\.$': {
|
|
2717
2717
|
gettext: gettext('This command returns a list of shell commands with description that can be created for the LWM2M device connector.')
|
|
2718
2718
|
},
|
|
2719
|
-
'^The following operations are supported
|
|
2719
|
+
'^The following operations are supported:$': {
|
|
2720
2720
|
gettext: gettext('The following operations are supported:')
|
|
2721
2721
|
},
|
|
2722
2722
|
'^PSK template$': {
|
|
@@ -4765,6 +4765,22 @@ class FilesService {
|
|
|
4765
4765
|
const allowedExts = this.extractFileExtensions(accept);
|
|
4766
4766
|
return filesExts.every(ext => allowedExts.includes(ext));
|
|
4767
4767
|
}
|
|
4768
|
+
/**
|
|
4769
|
+
* Checks if file names have allowed extension.
|
|
4770
|
+
* If the accept parameter is not specified, all extensions are accepted.
|
|
4771
|
+
* @param fileNames The file names to check.
|
|
4772
|
+
* @param accept String of comma separated file extensions and generic types ([GENERIC_FILE_TYPE]{@link GENERIC_FILE_TYPE}), e.g. .zip,.7z,excel.
|
|
4773
|
+
* @returns Returns true if each file has allowed extension.
|
|
4774
|
+
*/
|
|
4775
|
+
fileNamesHaveValidExtension(fileNames, accept) {
|
|
4776
|
+
if (!accept) {
|
|
4777
|
+
return true;
|
|
4778
|
+
}
|
|
4779
|
+
fileNames = Array.isArray(fileNames) ? fileNames : [fileNames];
|
|
4780
|
+
const filesExts = fileNames.map((file) => { var _a; return (_a = this.getFileExtension(file)) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
|
|
4781
|
+
const allowedExts = this.extractFileExtensions(accept);
|
|
4782
|
+
return filesExts.every(ext => allowedExts.includes(ext));
|
|
4783
|
+
}
|
|
4768
4784
|
/**
|
|
4769
4785
|
* Checks if each file has a valid filename length.
|
|
4770
4786
|
* @param files Files to check.
|
|
@@ -4777,11 +4793,11 @@ class FilesService {
|
|
|
4777
4793
|
}
|
|
4778
4794
|
/**
|
|
4779
4795
|
* Extracts the file extension.
|
|
4780
|
-
* @param
|
|
4796
|
+
* @param fileOrFileName File or name of file from which the extension should be extracted.
|
|
4781
4797
|
* @returns Returns the file extension or undefined if the file has no extension.
|
|
4782
4798
|
*/
|
|
4783
|
-
getFileExtension(
|
|
4784
|
-
const fileNameAndFileExt =
|
|
4799
|
+
getFileExtension(fileOrFileName) {
|
|
4800
|
+
const fileNameAndFileExt = (typeof fileOrFileName === 'string' ? fileOrFileName : fileOrFileName.name).split('.');
|
|
4785
4801
|
if (fileNameAndFileExt.length === 1) {
|
|
4786
4802
|
// no file ext
|
|
4787
4803
|
return undefined;
|
|
@@ -5534,7 +5550,7 @@ class Permissions {
|
|
|
5534
5550
|
* Checks if the current user has write permissions for the given mo.
|
|
5535
5551
|
* (either through global role, individual device permissions or via inventory roles).
|
|
5536
5552
|
*
|
|
5537
|
-
* @param
|
|
5553
|
+
* @param roleIds The array of role ids to check if the current user have at least one of them.
|
|
5538
5554
|
* @param {IManagedObject | IIdentified} mo The managed object for which we are checking whether the user has access.
|
|
5539
5555
|
* @param {CanEditConfig} config A configuration object that can take the following values:
|
|
5540
5556
|
* - `skipRolesCheck`: `boolean` - skips roles check,
|
|
@@ -5614,6 +5630,73 @@ class Permissions {
|
|
|
5614
5630
|
});
|
|
5615
5631
|
}
|
|
5616
5632
|
}
|
|
5633
|
+
Permissions.ROLE_ADVANCED_SOFTWARE_ADMIN = 'ROLE_ADVANCED_SOFTWARE_ADMIN';
|
|
5634
|
+
Permissions.ROLE_ADVANCED_SOFTWARE_READ = 'ROLE_ADVANCED_SOFTWARE_READ';
|
|
5635
|
+
Permissions.ROLE_ALARM_ADMIN = 'ROLE_ALARM_ADMIN';
|
|
5636
|
+
Permissions.ROLE_ALARM_READ = 'ROLE_ALARM_READ';
|
|
5637
|
+
Permissions.ROLE_ANALYTICSBUILDER_READ = 'ROLE_ANALYTICSBUILDER_READ';
|
|
5638
|
+
Permissions.ROLE_APPLICATION_MANAGEMENT_ADMIN = 'ROLE_APPLICATION_MANAGEMENT_ADMIN';
|
|
5639
|
+
Permissions.ROLE_APPLICATION_MANAGEMENT_READ = 'ROLE_APPLICATION_MANAGEMENT_READ';
|
|
5640
|
+
Permissions.ROLE_AUDIT_ADMIN = 'ROLE_AUDIT_ADMIN';
|
|
5641
|
+
Permissions.ROLE_AUDIT_READ = 'ROLE_AUDIT_READ';
|
|
5642
|
+
Permissions.ROLE_BINARY_ADMIN = 'ROLE_BINARY_ADMIN';
|
|
5643
|
+
Permissions.ROLE_BINARY_CREATE = 'ROLE_BINARY_CREATE';
|
|
5644
|
+
Permissions.ROLE_BINARY_READ = 'ROLE_BINARY_READ';
|
|
5645
|
+
Permissions.ROLE_BULK_OPERATION_ADMIN = 'ROLE_BULK_OPERATION_ADMIN';
|
|
5646
|
+
Permissions.ROLE_BULK_OPERATION_READ = 'ROLE_BULK_OPERATION_READ';
|
|
5647
|
+
Permissions.ROLE_CEP_MANAGEMENT_ADMIN = 'ROLE_CEP_MANAGEMENT_ADMIN';
|
|
5648
|
+
Permissions.ROLE_CEP_MANAGEMENT_READ = 'ROLE_CEP_MANAGEMENT_READ';
|
|
5649
|
+
Permissions.ROLE_DATA_BROKER_ADMIN = 'ROLE_DATA_BROKER_ADMIN';
|
|
5650
|
+
Permissions.ROLE_DATA_BROKER_READ = 'ROLE_DATA_BROKER_READ';
|
|
5651
|
+
Permissions.ROLE_DEVICE_CONTROL_ADMIN = 'ROLE_DEVICE_CONTROL_ADMIN';
|
|
5652
|
+
Permissions.ROLE_DEVICE_CONTROL_READ = 'ROLE_DEVICE_CONTROL_READ';
|
|
5653
|
+
Permissions.ROLE_EMAIL_CREATE = 'ROLE_EMAIL_CREATE';
|
|
5654
|
+
Permissions.ROLE_EPLAPPS_READ = 'ROLE_EPLAPPS_READ';
|
|
5655
|
+
Permissions.ROLE_EVENT_ADMIN = 'ROLE_EVENT_ADMIN';
|
|
5656
|
+
Permissions.ROLE_EVENT_READ = 'ROLE_EVENT_READ';
|
|
5657
|
+
Permissions.ROLE_GENERIC_MQTT_ADMIN = 'ROLE_GENERIC_MQTT_ADMIN';
|
|
5658
|
+
Permissions.ROLE_IDENTITY_ADMIN = 'ROLE_IDENTITY_ADMIN';
|
|
5659
|
+
Permissions.ROLE_IDENTITY_READ = 'ROLE_IDENTITY_READ';
|
|
5660
|
+
Permissions.ROLE_INVENTORY_ADMIN = 'ROLE_INVENTORY_ADMIN';
|
|
5661
|
+
Permissions.ROLE_INVENTORY_CREATE = 'ROLE_INVENTORY_CREATE';
|
|
5662
|
+
Permissions.ROLE_INVENTORY_READ = 'ROLE_INVENTORY_READ';
|
|
5663
|
+
Permissions.ROLE_MACHINE_LEARNING_READ = 'ROLE_MACHINE_LEARNING_READ';
|
|
5664
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN = 'ROLE_MANAGED_OBJECT_ADMIN';
|
|
5665
|
+
Permissions.ROLE_MANAGED_OBJECT_CREATE = 'ROLE_MANAGED_OBJECT_CREATE';
|
|
5666
|
+
Permissions.ROLE_MANAGED_OBJECT_READ = 'ROLE_MANAGED_OBJECT_READ';
|
|
5667
|
+
Permissions.ROLE_MEASUREMENT_ADMIN = 'ROLE_MEASUREMENT_ADMIN';
|
|
5668
|
+
Permissions.ROLE_MEASUREMENT_READ = 'ROLE_MEASUREMENT_READ';
|
|
5669
|
+
Permissions.ROLE_MQTT_CONNECT_ADMIN = 'ROLE_MQTT_CONNECT_ADMIN';
|
|
5670
|
+
Permissions.ROLE_MQTT_SERVICE_ADMIN = 'ROLE_MQTT_SERVICE_ADMIN';
|
|
5671
|
+
Permissions.ROLE_NOTIFICATION_2_ADMIN = 'ROLE_NOTIFICATION_2_ADMIN';
|
|
5672
|
+
Permissions.ROLE_OPTION_MANAGEMENT_ADMIN = 'ROLE_OPTION_MANAGEMENT_ADMIN';
|
|
5673
|
+
Permissions.ROLE_OPTION_MANAGEMENT_READ = 'ROLE_OPTION_MANAGEMENT_READ';
|
|
5674
|
+
Permissions.ROLE_PROVISIONING_CREATE = 'ROLE_PROVISIONING_CREATE';
|
|
5675
|
+
Permissions.ROLE_PROVISIONING_READ = 'ROLE_PROVISIONING_READ';
|
|
5676
|
+
Permissions.ROLE_PROVISIONING_UPDATE = 'ROLE_PROVISIONING_UPDATE';
|
|
5677
|
+
Permissions.ROLE_REMOTE_ACCESS_ADMIN = 'ROLE_REMOTE_ACCESS_ADMIN';
|
|
5678
|
+
Permissions.ROLE_RETENTION_RULE_ADMIN = 'ROLE_RETENTION_RULE_ADMIN';
|
|
5679
|
+
Permissions.ROLE_RETENTION_RULE_READ = 'ROLE_RETENTION_RULE_READ';
|
|
5680
|
+
Permissions.ROLE_SCHEDULE_REPORT_ADMIN = 'ROLE_SCHEDULE_REPORT_ADMIN';
|
|
5681
|
+
Permissions.ROLE_SIMULATOR_ADMIN = 'ROLE_SIMULATOR_ADMIN';
|
|
5682
|
+
Permissions.ROLE_SMARTGROUP_ADMIN = 'ROLE_SMARTGROUP_ADMIN';
|
|
5683
|
+
Permissions.ROLE_SMARTGROUP_CREATE = 'ROLE_SMARTGROUP_CREATE';
|
|
5684
|
+
Permissions.ROLE_SMARTGROUP_UPDATE = 'ROLE_SMARTGROUP_UPDATE';
|
|
5685
|
+
Permissions.ROLE_SMARTRULE_ADMIN = 'ROLE_SMARTRULE_ADMIN';
|
|
5686
|
+
Permissions.ROLE_SMARTRULE_READ = 'ROLE_SMARTRULE_READ';
|
|
5687
|
+
Permissions.ROLE_SMS_ADMIN = 'ROLE_SMS_ADMIN';
|
|
5688
|
+
Permissions.ROLE_SMS_READ = 'ROLE_SMS_READ';
|
|
5689
|
+
Permissions.ROLE_TENANT_ADMIN = 'ROLE_TENANT_ADMIN';
|
|
5690
|
+
Permissions.ROLE_TENANT_MANAGEMENT_ADMIN = 'ROLE_TENANT_MANAGEMENT_ADMIN';
|
|
5691
|
+
Permissions.ROLE_TENANT_MANAGEMENT_CREATE = 'ROLE_TENANT_MANAGEMENT_CREATE';
|
|
5692
|
+
Permissions.ROLE_TENANT_MANAGEMENT_READ = 'ROLE_TENANT_MANAGEMENT_READ';
|
|
5693
|
+
Permissions.ROLE_TENANT_MANAGEMENT_UPDATE = 'ROLE_TENANT_MANAGEMENT_UPDATE';
|
|
5694
|
+
Permissions.ROLE_TENANT_STATISTICS_READ = 'ROLE_TENANT_STATISTICS_READ';
|
|
5695
|
+
Permissions.ROLE_USER_MANAGEMENT_ADMIN = 'ROLE_USER_MANAGEMENT_ADMIN';
|
|
5696
|
+
Permissions.ROLE_USER_MANAGEMENT_CREATE = 'ROLE_USER_MANAGEMENT_CREATE';
|
|
5697
|
+
Permissions.ROLE_USER_MANAGEMENT_OWN_ADMIN = 'ROLE_USER_MANAGEMENT_OWN_ADMIN';
|
|
5698
|
+
Permissions.ROLE_USER_MANAGEMENT_OWN_READ = 'ROLE_USER_MANAGEMENT_OWN_READ';
|
|
5699
|
+
Permissions.ROLE_USER_MANAGEMENT_READ = 'ROLE_USER_MANAGEMENT_READ';
|
|
5617
5700
|
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 });
|
|
5618
5701
|
Permissions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Permissions, providedIn: 'root' });
|
|
5619
5702
|
__decorate([
|
|
@@ -6495,7 +6578,14 @@ class UserPreferencesService {
|
|
|
6495
6578
|
* @returns A proper storage.
|
|
6496
6579
|
*/
|
|
6497
6580
|
getStorage(user) {
|
|
6498
|
-
return this.user.hasAllRoles(user, [
|
|
6581
|
+
return this.user.hasAllRoles(user, [
|
|
6582
|
+
Permissions.ROLE_INVENTORY_READ,
|
|
6583
|
+
Permissions.ROLE_INVENTORY_ADMIN
|
|
6584
|
+
]) ||
|
|
6585
|
+
this.user.hasAllRoles(user, [
|
|
6586
|
+
Permissions.ROLE_MANAGED_OBJECT_ADMIN,
|
|
6587
|
+
Permissions.ROLE_MANAGED_OBJECT_READ
|
|
6588
|
+
])
|
|
6499
6589
|
? this.storage.inventory
|
|
6500
6590
|
: this.storage.local;
|
|
6501
6591
|
}
|
|
@@ -6727,7 +6817,12 @@ class GlobalConfigService {
|
|
|
6727
6817
|
this.fragmentTypeMapping = {
|
|
6728
6818
|
c8y_Software: 'c8y_SoftwareAsGlobal',
|
|
6729
6819
|
c8y_Firmware: 'c8y_FirmwareAsGlobal',
|
|
6730
|
-
c8y_ConfigurationDump: 'c8y_ConfigurationAsGlobal'
|
|
6820
|
+
c8y_ConfigurationDump: 'c8y_ConfigurationAsGlobal',
|
|
6821
|
+
c8y_DeviceShellTemplate: 'c8y_ShellTemplateAsGlobal',
|
|
6822
|
+
c8y_ModbusDeviceType: 'c8y_FieldbusAsGlobal',
|
|
6823
|
+
c8y_CANopenDeviceType: 'c8y_CANOpenAsGlobal',
|
|
6824
|
+
c8y_LoraDeviceType: 'c8y_LoraAsGlobal',
|
|
6825
|
+
c8y_SigfoxDeviceType: 'c8y_SigfoxAsGlobal'
|
|
6731
6826
|
};
|
|
6732
6827
|
this.cache = undefined;
|
|
6733
6828
|
}
|
|
@@ -6826,7 +6921,7 @@ class TenantUiService {
|
|
|
6826
6921
|
this.userService = userService;
|
|
6827
6922
|
this.appStateService = appStateService;
|
|
6828
6923
|
this.MANAGEMENT = 'management';
|
|
6829
|
-
this.ROLE_TENANT_MANAGEMENT_READ =
|
|
6924
|
+
this.ROLE_TENANT_MANAGEMENT_READ = Permissions.ROLE_TENANT_MANAGEMENT_READ;
|
|
6830
6925
|
}
|
|
6831
6926
|
/**
|
|
6832
6927
|
* Returns current tenant
|
|
@@ -10818,7 +10913,7 @@ class SetupService {
|
|
|
10818
10913
|
this.ui = ui;
|
|
10819
10914
|
this.pluginsResolve = pluginsResolve;
|
|
10820
10915
|
this.skipSetup$ = new BehaviorSubject(false);
|
|
10821
|
-
this.isSetupNeeded$ = this.pluginsResolve.allPluginsLoaded$.pipe(filter(loaded => loaded), switchMap(() => this.ui.isOwnerOfApplication$()), switchMap(isOwner => {
|
|
10916
|
+
this.isSetupNeeded$ = this.pluginsResolve.allPluginsLoaded$.pipe(filter(loaded => loaded), switchMap(() => this.ui.currentUser.pipe(filter(user => !!user))), switchMap(() => this.ui.isOwnerOfApplication$()), switchMap(isOwner => {
|
|
10822
10917
|
if (!isOwner) {
|
|
10823
10918
|
return of([]);
|
|
10824
10919
|
}
|
|
@@ -20405,6 +20500,7 @@ class DropAreaComponent {
|
|
|
20405
20500
|
this.clearErrors();
|
|
20406
20501
|
this.dropped.emit(null);
|
|
20407
20502
|
this.onChange(null);
|
|
20503
|
+
this.onTouched();
|
|
20408
20504
|
this.cd.markForCheck();
|
|
20409
20505
|
}
|
|
20410
20506
|
writeValue(value) {
|
|
@@ -20426,6 +20522,7 @@ class DropAreaComponent {
|
|
|
20426
20522
|
onFilesSelected(files) {
|
|
20427
20523
|
var _a, _b;
|
|
20428
20524
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20525
|
+
this.onTouched();
|
|
20429
20526
|
const hasValidNameLength = this.filesService.checkMaxLength(files);
|
|
20430
20527
|
if (!hasValidNameLength) {
|
|
20431
20528
|
this.onFileInvalidNameLength();
|
|
@@ -22150,7 +22247,7 @@ class SupportOutletComponent {
|
|
|
22150
22247
|
const textWithCompany = gettext('You are about to block a support user from {{companyName}} from accessing your tenant to help you with your issue.');
|
|
22151
22248
|
const textWithoutCompany = gettext('You are about to block a support user from accessing your tenant to help you with your issue.');
|
|
22152
22249
|
const { data: currentUser } = yield this.userService.current();
|
|
22153
|
-
const isTenantAdmin = this.userService.hasRole(currentUser,
|
|
22250
|
+
const isTenantAdmin = this.userService.hasRole(currentUser, Permissions.ROLE_TENANT_ADMIN);
|
|
22154
22251
|
const tenantAdminNote = gettext('Deactivating support access as tenant admin will disable all other support requests on your tenant.');
|
|
22155
22252
|
const finalQuestion = gettext('Do you want to proceed?');
|
|
22156
22253
|
const body = [
|