@castlabs/ui 7.10.0 → 7.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/castlabs-ui.common.js +2 -2
- package/dist/castlabs-ui.common.js.map +1 -1
- package/dist/castlabs-ui.core.js +58 -71
- package/dist/castlabs-ui.css +1 -1
- package/dist/castlabs-ui.module.d.ts +2 -3
- package/dist/castlabs-ui.module.js +49 -62
- package/dist/castlabs-ui.umd.js +3 -3
- package/dist/castlabs-ui.umd.js.map +1 -1
- package/package.json +16 -16
- package/src/components/form/ClFieldGroup/style.scss +24 -0
- package/src/components/form/ClFieldSet/style.scss +10 -26
- package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +73 -0
- package/src/styles/layout/color.scss +29 -29
- package/src/styles/layout/meta.scss +1 -1
- package/types/castlabs-ui.module.d.ts +2 -3
- package/types/index.d.ts +7 -3
package/dist/castlabs-ui.core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @castlabs/ui v7.
|
|
1
|
+
/* @castlabs/ui v7.11.0 */
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
4
|
* Bootstrap v5.3.8 (https://getbootstrap.com/)
|
|
@@ -473,30 +473,12 @@ const PLAN = {
|
|
|
473
473
|
CUSTOM: 3
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
const
|
|
477
|
-
SERVICE,
|
|
478
|
-
ROLE,
|
|
479
|
-
STATE,
|
|
480
|
-
LICENSE_STATE,
|
|
481
|
-
PLAN
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// ----------------------------------------------------------------------------------------
|
|
485
|
-
|
|
486
|
-
function urlCS (env, oid, path) {
|
|
487
|
-
return getDevTestUrl(
|
|
488
|
-
env,
|
|
489
|
-
`https://account.test.cs.castlabs.com/o/${oid ?? ''}${path ?? ''}`,
|
|
490
|
-
`https://account.castlabs.com/o/${oid ?? ''}${path ?? ''}`
|
|
491
|
-
)
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
const NAV = {
|
|
476
|
+
const APPS = {
|
|
495
477
|
CP: {
|
|
496
478
|
id: 'CP',
|
|
497
479
|
subtitle: SERVICE.CP_TAGLINE,
|
|
498
480
|
title: SERVICE.CP,
|
|
499
|
-
services: [
|
|
481
|
+
services: [SERVICE.CP_URN],
|
|
500
482
|
roles: [ROLE.CP_USER_URN],
|
|
501
483
|
urlManage: (env, oid) =>
|
|
502
484
|
getEnvUrl(
|
|
@@ -512,7 +494,7 @@ const NAV = {
|
|
|
512
494
|
id: 'CS',
|
|
513
495
|
subtitle: SERVICE.CS_TAGLINE,
|
|
514
496
|
title: SERVICE.CS,
|
|
515
|
-
services: [
|
|
497
|
+
services: [SERVICE.CS_URN],
|
|
516
498
|
roles: [],
|
|
517
499
|
urlManage: (env, oid) => urlCS(env, oid),
|
|
518
500
|
urlPlan: (env, oid) => urlCS(env, oid),
|
|
@@ -523,7 +505,7 @@ const NAV = {
|
|
|
523
505
|
id: 'DT',
|
|
524
506
|
subtitle: SERVICE.DT_TAGLINE,
|
|
525
507
|
title: SERVICE.DT,
|
|
526
|
-
services: [
|
|
508
|
+
services: [SERVICE.DT_URN],
|
|
527
509
|
roles: [
|
|
528
510
|
ROLE.DT_MEMBERS_URN,
|
|
529
511
|
ROLE.DT_SUBORGS_URN,
|
|
@@ -547,7 +529,7 @@ const NAV = {
|
|
|
547
529
|
id: 'DTO',
|
|
548
530
|
subtitle: SERVICE.DTO_TAGLINE,
|
|
549
531
|
title: SERVICE.DTO,
|
|
550
|
-
services: [
|
|
532
|
+
services: [SERVICE.DTO_URN],
|
|
551
533
|
roles: [
|
|
552
534
|
ROLE.DTO_DEVICES_URN,
|
|
553
535
|
ROLE.DTO_KEYBOX_URN,
|
|
@@ -564,7 +546,7 @@ const NAV = {
|
|
|
564
546
|
id: 'DTS',
|
|
565
547
|
subtitle: SERVICE.DTS_TAGLINE,
|
|
566
548
|
title: SERVICE.DTS,
|
|
567
|
-
services: [
|
|
549
|
+
services: [SERVICE.DTS_URN],
|
|
568
550
|
roles: [
|
|
569
551
|
ROLE.DTS_MEMBERS_URN,
|
|
570
552
|
ROLE.DTS_SUBORGS_URN,
|
|
@@ -589,13 +571,13 @@ const NAV = {
|
|
|
589
571
|
subtitle: SERVICE.PP_TAGLINE,
|
|
590
572
|
title: SERVICE.PP,
|
|
591
573
|
services: [
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
574
|
+
SERVICE.PP_URN,
|
|
575
|
+
SERVICE.PP_URN_ANDROID,
|
|
576
|
+
SERVICE.PP_URN_BROWSER,
|
|
577
|
+
SERVICE.PP_URN_GSTREAMER,
|
|
578
|
+
SERVICE.PP_URN_IOS,
|
|
579
|
+
SERVICE.PP_URN_REACTNATIVE,
|
|
580
|
+
SERVICE.PP_URN_WEBRTC
|
|
599
581
|
],
|
|
600
582
|
roles: [ROLE.PP_USER_URN, ROLE.PP_ADMIN_URN],
|
|
601
583
|
urlManage: (env, oid) =>
|
|
@@ -611,7 +593,7 @@ const NAV = {
|
|
|
611
593
|
id: 'WM',
|
|
612
594
|
subtitle: SERVICE.WM_TAGLINE,
|
|
613
595
|
title: SERVICE.WM,
|
|
614
|
-
services: [
|
|
596
|
+
services: [SERVICE.WM_URN],
|
|
615
597
|
roles: [ROLE.WM_DEMO_URN, ROLE.WM_EXTRACTION_URN],
|
|
616
598
|
urlManage: (env, oid) =>
|
|
617
599
|
getEnvUrl(
|
|
@@ -626,7 +608,7 @@ const NAV = {
|
|
|
626
608
|
VTK: {
|
|
627
609
|
id: 'VTK',
|
|
628
610
|
subtitle: SERVICE.VTK_TAGLINE,
|
|
629
|
-
services: [
|
|
611
|
+
services: [SERVICE.VTK_URN],
|
|
630
612
|
roles: [ROLE.VTK_USER_URN, ROLE.VTK_ADMIN_URN],
|
|
631
613
|
title: SERVICE.VTK,
|
|
632
614
|
urlManage: (env, oid) =>
|
|
@@ -636,6 +618,27 @@ const NAV = {
|
|
|
636
618
|
}
|
|
637
619
|
}
|
|
638
620
|
|
|
621
|
+
// ----------------------------------------------------------------------------------------
|
|
622
|
+
|
|
623
|
+
const CS = {
|
|
624
|
+
SERVICE,
|
|
625
|
+
ROLE,
|
|
626
|
+
STATE,
|
|
627
|
+
LICENSE_STATE,
|
|
628
|
+
PLAN,
|
|
629
|
+
APPS
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// ----------------------------------------------------------------------------------------
|
|
633
|
+
|
|
634
|
+
function urlCS (env, oid, path) {
|
|
635
|
+
return getDevTestUrl(
|
|
636
|
+
env,
|
|
637
|
+
`https://account.test.cs.castlabs.com/o/${oid ?? ''}${path ?? ''}`,
|
|
638
|
+
`https://account.castlabs.com/o/${oid ?? ''}${path ?? ''}`
|
|
639
|
+
)
|
|
640
|
+
}
|
|
641
|
+
|
|
639
642
|
function getDevTestUrl (env, urlDevTest, urlOther) {
|
|
640
643
|
return getEnvUrl(env, urlDevTest, urlOther, [ENV.DEV, ENV.TEST])
|
|
641
644
|
}
|
|
@@ -740,7 +743,7 @@ function variant (service, license, oid, env, hasRole) {
|
|
|
740
743
|
// no license = show subscribe ad
|
|
741
744
|
if (!license) {
|
|
742
745
|
// some items are hidden if there is no license
|
|
743
|
-
if ([
|
|
746
|
+
if ([APPS.DTS.id].includes(service.id)) return null
|
|
744
747
|
|
|
745
748
|
// other items we hint the user to subscribe
|
|
746
749
|
return subscribe(service, oid, env)
|
|
@@ -772,14 +775,14 @@ function csGetNavVariant (membership, service, oid, env) {
|
|
|
772
775
|
}
|
|
773
776
|
|
|
774
777
|
function csParseMembership (membership, oid, env) {
|
|
775
|
-
const nav = [subscribed(
|
|
778
|
+
const nav = [subscribed(APPS.CS, oid, env)]
|
|
776
779
|
|
|
777
|
-
nav.push(csGetNavVariant(membership,
|
|
778
|
-
const dts = csGetNavVariant(membership,
|
|
780
|
+
nav.push(csGetNavVariant(membership, APPS.DT, oid, env))
|
|
781
|
+
const dts = csGetNavVariant(membership, APPS.DTS, oid, env)
|
|
779
782
|
if (dts) nav.push(dts)
|
|
780
|
-
nav.push(csGetNavVariant(membership,
|
|
781
|
-
nav.push(csGetNavVariant(membership,
|
|
782
|
-
nav.push(csGetNavVariant(membership,
|
|
783
|
+
nav.push(csGetNavVariant(membership, APPS.PP, oid, env))
|
|
784
|
+
nav.push(csGetNavVariant(membership, APPS.WM, oid, env))
|
|
785
|
+
nav.push(csGetNavVariant(membership, APPS.VTK, oid, env))
|
|
783
786
|
|
|
784
787
|
return nav
|
|
785
788
|
}
|
|
@@ -804,11 +807,11 @@ function csGetNav (memberships, oid, env) {
|
|
|
804
807
|
|
|
805
808
|
return [
|
|
806
809
|
// static nav
|
|
807
|
-
subscribed(
|
|
808
|
-
disabled(
|
|
809
|
-
disabled(
|
|
810
|
-
disabled(
|
|
811
|
-
disabled(
|
|
810
|
+
subscribed(APPS.CS),
|
|
811
|
+
disabled(APPS.DT),
|
|
812
|
+
disabled(APPS.PP),
|
|
813
|
+
disabled(APPS.WM),
|
|
814
|
+
disabled(APPS.VTK)
|
|
812
815
|
]
|
|
813
816
|
}
|
|
814
817
|
|
|
@@ -1637,22 +1640,6 @@ function clSleep (ms) {
|
|
|
1637
1640
|
return new Promise(resolve => setTimeout(resolve, ms))
|
|
1638
1641
|
}
|
|
1639
1642
|
|
|
1640
|
-
// -----------------------------------------------------------------------------
|
|
1641
|
-
// --- $ref typescript cast methods --------------------------------------------
|
|
1642
|
-
// -----------------------------------------------------------------------------
|
|
1643
|
-
|
|
1644
|
-
function clRefClField (ref) {
|
|
1645
|
-
return ref
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
function clRefClFieldGroup (ref) {
|
|
1649
|
-
return ref
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
function clRefHTMLElement (ref) {
|
|
1653
|
-
return ref
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
1643
|
const NBSP = '✺' // non-breakable space for searching substrings
|
|
1657
1644
|
|
|
1658
1645
|
let cache = {}
|
|
@@ -1815,16 +1802,16 @@ function clGetServices () {
|
|
|
1815
1802
|
// static nav items if no CS integration is available
|
|
1816
1803
|
return [
|
|
1817
1804
|
// sorted alphabeticaly by title
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1805
|
+
CS.APPS.CS,
|
|
1806
|
+
CS.APPS.CP,
|
|
1807
|
+
CS.APPS.DT,
|
|
1808
|
+
CS.APPS.DTS,
|
|
1809
|
+
CS.APPS.DTO,
|
|
1810
|
+
CS.APPS.PP,
|
|
1811
|
+
CS.APPS.WM,
|
|
1812
|
+
CS.APPS.VTK
|
|
1826
1813
|
]
|
|
1827
1814
|
}
|
|
1828
1815
|
|
|
1829
1816
|
// compatibility export with previous ui-lib versions
|
|
1830
|
-
const NAV =
|
|
1817
|
+
const NAV = CS.APPS
|