@kodaris/krubble-app-components 1.0.34 → 1.0.36
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/breaking-changes.json +1 -1
- package/dist/krubble-app.bundled.js +21 -92
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +36 -78
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +21 -92
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +34 -76
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/dist/screen-nav.d.ts +8 -19
- package/dist/screen-nav.d.ts.map +1 -1
- package/dist/screen-nav.js +21 -92
- package/dist/screen-nav.js.map +1 -1
- package/package.json +1 -1
package/dist/krubble-app.umd.js
CHANGED
|
@@ -3163,9 +3163,8 @@
|
|
|
3163
3163
|
* ## Usage
|
|
3164
3164
|
* ```html
|
|
3165
3165
|
* <kr-screen-nav
|
|
3166
|
-
*
|
|
3167
|
-
*
|
|
3168
|
-
* backUrl="/crm/companies"
|
|
3166
|
+
* label="Acme Corporation"
|
|
3167
|
+
* subLabel="Company"
|
|
3169
3168
|
* .navItems=${[
|
|
3170
3169
|
* { id: 'overview', label: 'Overview', url: '/companies/123/overview' },
|
|
3171
3170
|
* { id: 'contacts', label: 'Contacts', url: '/companies/123/contacts' },
|
|
@@ -3179,9 +3178,8 @@
|
|
|
3179
3178
|
*
|
|
3180
3179
|
* @slot - The main screen content
|
|
3181
3180
|
*
|
|
3182
|
-
* @property {string}
|
|
3183
|
-
* @property {string}
|
|
3184
|
-
* @property {string} backUrl - URL to navigate back to (e.g., the table/list view)
|
|
3181
|
+
* @property {string} label - Main label (e.g., entity name like "Acme Corporation")
|
|
3182
|
+
* @property {string} subLabel - Sub label (e.g., entity type like "Company")
|
|
3185
3183
|
* @property {KRScreenNavItem[]} navItems - Navigation items as JSON array
|
|
3186
3184
|
* @property {string} activeId - Currently active item ID
|
|
3187
3185
|
*/
|
|
@@ -3189,17 +3187,13 @@
|
|
|
3189
3187
|
constructor() {
|
|
3190
3188
|
super(...arguments);
|
|
3191
3189
|
/**
|
|
3192
|
-
* Main
|
|
3190
|
+
* Main label (e.g., entity name like "Acme Corporation")
|
|
3193
3191
|
*/
|
|
3194
|
-
this.
|
|
3195
|
-
/**
|
|
3196
|
-
* Subtitle/label (e.g., entity type like "Company")
|
|
3197
|
-
*/
|
|
3198
|
-
this.subtitle = '';
|
|
3192
|
+
this.label = '';
|
|
3199
3193
|
/**
|
|
3200
|
-
*
|
|
3194
|
+
* Sub label (e.g., entity type like "Company")
|
|
3201
3195
|
*/
|
|
3202
|
-
this.
|
|
3196
|
+
this.subLabel = '';
|
|
3203
3197
|
/**
|
|
3204
3198
|
* Navigation items
|
|
3205
3199
|
*/
|
|
@@ -3237,34 +3231,14 @@
|
|
|
3237
3231
|
e.preventDefault();
|
|
3238
3232
|
}
|
|
3239
3233
|
}
|
|
3240
|
-
/**
|
|
3241
|
-
* Updates the active nav item based on the current URL.
|
|
3242
|
-
* Called automatically by `KRScreenNavDirective` on Angular route changes.
|
|
3243
|
-
*/
|
|
3244
|
-
updateActiveNavItem() {
|
|
3245
|
-
const currentPath = window.location.pathname;
|
|
3246
|
-
const activeItem = this.navItems.find(item => {
|
|
3247
|
-
if (!item.url)
|
|
3248
|
-
return false;
|
|
3249
|
-
// Handle both absolute and relative URLs
|
|
3250
|
-
if (item.url.startsWith('./')) {
|
|
3251
|
-
const segment = item.url.replace(/^\.\//, '');
|
|
3252
|
-
return currentPath.endsWith('/' + segment);
|
|
3253
|
-
}
|
|
3254
|
-
return currentPath === item.url || currentPath.startsWith(item.url + '/');
|
|
3255
|
-
});
|
|
3256
|
-
if (activeItem) {
|
|
3257
|
-
this.activeId = activeItem.id;
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
3234
|
render() {
|
|
3261
3235
|
return b `
|
|
3262
3236
|
<nav class="nav">
|
|
3263
|
-
${this.
|
|
3237
|
+
${this.label ? b `
|
|
3264
3238
|
<div class="nav-header">
|
|
3265
3239
|
<div class="nav-header__text">
|
|
3266
|
-
${this.
|
|
3267
|
-
<div class="nav-header__title">${this.
|
|
3240
|
+
${this.subLabel ? b `<div class="nav-header__subtitle">${this.subLabel}</div>` : A}
|
|
3241
|
+
<div class="nav-header__title">${this.label}</div>
|
|
3268
3242
|
</div>
|
|
3269
3243
|
</div>
|
|
3270
3244
|
` : A}
|
|
@@ -3286,13 +3260,6 @@
|
|
|
3286
3260
|
<div class="content__main">
|
|
3287
3261
|
<slot></slot>
|
|
3288
3262
|
</div>
|
|
3289
|
-
<!--<div class="breadcrumbs">
|
|
3290
|
-
<a href="/crm">CRM</a>
|
|
3291
|
-
<span class="breadcrumbs__separator">/</span>
|
|
3292
|
-
<a href="/crm/companies">Companies</a>
|
|
3293
|
-
<span class="breadcrumbs__separator">/</span>
|
|
3294
|
-
<span class="breadcrumbs__current">Acme Corporation</span>
|
|
3295
|
-
</div>-->
|
|
3296
3263
|
</main>
|
|
3297
3264
|
`;
|
|
3298
3265
|
}
|
|
@@ -3354,13 +3321,14 @@
|
|
|
3354
3321
|
.nav-item {
|
|
3355
3322
|
display: block;
|
|
3356
3323
|
padding: 0 12px;
|
|
3357
|
-
height:
|
|
3358
|
-
line-height:
|
|
3359
|
-
letter-spacing: 0.
|
|
3324
|
+
height: 32px;
|
|
3325
|
+
line-height: 32px;
|
|
3326
|
+
letter-spacing: 0.01em;
|
|
3360
3327
|
color: rgb(32, 33, 36);
|
|
3361
3328
|
text-decoration: none;
|
|
3362
3329
|
font-size: 13px;
|
|
3363
|
-
font-weight:
|
|
3330
|
+
font-weight: 400;
|
|
3331
|
+
font-family: inherit;
|
|
3364
3332
|
border-radius: 8px;
|
|
3365
3333
|
transition: all 0.15s ease;
|
|
3366
3334
|
}
|
|
@@ -3371,9 +3339,9 @@
|
|
|
3371
3339
|
}
|
|
3372
3340
|
|
|
3373
3341
|
.nav-item--active {
|
|
3374
|
-
background:
|
|
3375
|
-
color: #
|
|
3376
|
-
font-weight:
|
|
3342
|
+
background: #e1e9f6;
|
|
3343
|
+
color: #1a2332;
|
|
3344
|
+
font-weight: 700;
|
|
3377
3345
|
}
|
|
3378
3346
|
|
|
3379
3347
|
.content {
|
|
@@ -3383,42 +3351,6 @@
|
|
|
3383
3351
|
flex-direction: column;
|
|
3384
3352
|
}
|
|
3385
3353
|
|
|
3386
|
-
.breadcrumbs {
|
|
3387
|
-
height: 32px;
|
|
3388
|
-
padding: 0 1rem;
|
|
3389
|
-
display: flex;
|
|
3390
|
-
align-items: center;
|
|
3391
|
-
gap: 6px;
|
|
3392
|
-
font-size: 12px;
|
|
3393
|
-
color: #6b7280;
|
|
3394
|
-
//background: #f9fafb;
|
|
3395
|
-
background: #beea4e;
|
|
3396
|
-
border-top: 1px solid #e5e7eb;
|
|
3397
|
-
flex-shrink: 0;
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
.breadcrumbs a {
|
|
3401
|
-
//color: #6b7280;
|
|
3402
|
-
color: #10172a;
|
|
3403
|
-
font-size: 13px;
|
|
3404
|
-
font-weight: 600;
|
|
3405
|
-
text-decoration: none;
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
.breadcrumbs a:hover {
|
|
3409
|
-
color: #111827;
|
|
3410
|
-
text-decoration: underline;
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
.breadcrumbs__separator {
|
|
3414
|
-
color: #d1d5db;
|
|
3415
|
-
}
|
|
3416
|
-
|
|
3417
|
-
.breadcrumbs__current {
|
|
3418
|
-
color: #111827;
|
|
3419
|
-
font-weight: 500;
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
3354
|
.content__main {
|
|
3423
3355
|
flex: 1;
|
|
3424
3356
|
overflow-y: auto;
|
|
@@ -3426,13 +3358,10 @@
|
|
|
3426
3358
|
`;
|
|
3427
3359
|
__decorate$2([
|
|
3428
3360
|
n({ type: String })
|
|
3429
|
-
], exports.ScreenNav.prototype, "
|
|
3430
|
-
__decorate$2([
|
|
3431
|
-
n({ type: String })
|
|
3432
|
-
], exports.ScreenNav.prototype, "subtitle", void 0);
|
|
3361
|
+
], exports.ScreenNav.prototype, "label", void 0);
|
|
3433
3362
|
__decorate$2([
|
|
3434
3363
|
n({ type: String })
|
|
3435
|
-
], exports.ScreenNav.prototype, "
|
|
3364
|
+
], exports.ScreenNav.prototype, "subLabel", void 0);
|
|
3436
3365
|
__decorate$2([
|
|
3437
3366
|
n({ type: Array })
|
|
3438
3367
|
], exports.ScreenNav.prototype, "navItems", void 0);
|