@happyvertical/smrt-manufacturing 0.60.16 → 0.60.18
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/AssemblyForm.svelte +40 -43
- package/dist/svelte/components/AssemblyList.svelte +38 -38
- package/dist/svelte/components/BomEditor.svelte +79 -77
- package/dist/svelte/components/BomStructureTree.svelte +27 -25
- package/dist/svelte/components/OperationForm.svelte +31 -34
- package/dist/svelte/components/OperationList.svelte +29 -27
- package/dist/svelte/components/ProductionRunList.svelte +44 -39
- package/dist/svelte/components/RequirementsTree.svelte +29 -21
- package/dist/svelte/components/RequirementsTreeLevel.svelte +25 -25
- package/package.json +10 -10
|
@@ -219,17 +219,17 @@ const showActions = $derived(Boolean(onupdate || onremove));
|
|
|
219
219
|
const ancestors = $derived(bomId ? [bomId] : []);
|
|
220
220
|
</script>
|
|
221
221
|
|
|
222
|
-
<div class="bom-
|
|
222
|
+
<div class="smrt-bom-editor__root" data-smrt-component="BomEditor">
|
|
223
223
|
{#if error}
|
|
224
224
|
<Alert variant="error">{error}</Alert>
|
|
225
225
|
{/if}
|
|
226
226
|
|
|
227
227
|
{#if lines.length === 0}
|
|
228
|
-
<p class="bom-
|
|
228
|
+
<p class="smrt-bom-editor__empty" data-smrt-part="empty">{t(M['manufacturing.bom_editor.empty'])}</p>
|
|
229
229
|
{:else}
|
|
230
|
-
<div class="bom-
|
|
231
|
-
<table class="bom-
|
|
232
|
-
<caption class="bom-
|
|
230
|
+
<div class="smrt-bom-editor__scroll" data-smrt-part="body">
|
|
231
|
+
<table class="smrt-bom-editor__table" data-smrt-part="table">
|
|
232
|
+
<caption class="smrt-bom-editor__caption" data-smrt-part="caption">{t(M['manufacturing.bom_editor.caption'])}</caption>
|
|
233
233
|
<thead>
|
|
234
234
|
<tr>
|
|
235
235
|
<th scope="col">{t(M['manufacturing.bom_editor.component'])}</th>
|
|
@@ -254,14 +254,14 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
254
254
|
{@const subId = `${uid}-sub-${line.id}`}
|
|
255
255
|
{@const errorId = `${uid}-row-error-${line.id}`}
|
|
256
256
|
<tr>
|
|
257
|
-
<th scope="row" class="bom-
|
|
257
|
+
<th scope="row" class="smrt-bom-editor__component" data-smrt-part="title">{componentText(line)}</th>
|
|
258
258
|
<td>
|
|
259
|
-
<div class="bom-
|
|
259
|
+
<div class="smrt-bom-editor__kind" data-smrt-part="meta">
|
|
260
260
|
<Badge size="sm" variant={line.kind === 'missing' ? 'error' : 'default'}>
|
|
261
261
|
{t(componentKindLabelKey(line.kind))}
|
|
262
262
|
</Badge>
|
|
263
263
|
{#if line.kind === 'assembly'}
|
|
264
|
-
<span class="bom-
|
|
264
|
+
<span class="smrt-bom-editor__note" data-smrt-part="description">
|
|
265
265
|
{t(
|
|
266
266
|
line.subBomId
|
|
267
267
|
? M['manufacturing.bom_editor.has_bill']
|
|
@@ -331,13 +331,13 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
331
331
|
/>
|
|
332
332
|
</td>
|
|
333
333
|
{:else}
|
|
334
|
-
<td class="bom-
|
|
334
|
+
<td class="smrt-bom-editor__number" data-smrt-part="cell">{line.qtyPerUnit}</td>
|
|
335
335
|
<td>{line.uom}</td>
|
|
336
|
-
<td class="bom-
|
|
336
|
+
<td class="smrt-bom-editor__number" data-smrt-part="cell">{line.wastePercent}</td>
|
|
337
337
|
{/if}
|
|
338
338
|
{#if showActions}
|
|
339
339
|
<td>
|
|
340
|
-
<div class="bom-
|
|
340
|
+
<div class="smrt-bom-editor__actions" data-smrt-part="actions">
|
|
341
341
|
{#if onupdate}
|
|
342
342
|
<Button
|
|
343
343
|
variant="secondary"
|
|
@@ -362,7 +362,7 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
362
362
|
{/if}
|
|
363
363
|
</div>
|
|
364
364
|
{#if invalid.length > 0}
|
|
365
|
-
<ul class="bom-
|
|
365
|
+
<ul class="smrt-bom-editor__errors" data-smrt-part="error" id={errorId}>
|
|
366
366
|
{#each invalid as field (field)}
|
|
367
367
|
<li>{errorText(field)}</li>
|
|
368
368
|
{/each}
|
|
@@ -373,9 +373,9 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
373
373
|
</tr>
|
|
374
374
|
{#if canOpen && open[line.id] && line.subBomId}
|
|
375
375
|
{@const entry = loadedBills[line.subBomId]}
|
|
376
|
-
<tr class="bom-
|
|
376
|
+
<tr class="smrt-bom-editor__sub" data-smrt-part="row">
|
|
377
377
|
<td colspan={showActions ? 6 : 5}>
|
|
378
|
-
<div id={subId} class="bom-
|
|
378
|
+
<div id={subId} class="smrt-bom-editor__sub-bill" data-smrt-part="panel">
|
|
379
379
|
{#if entry?.state === 'ready'}
|
|
380
380
|
<BomStructureTree
|
|
381
381
|
lines={entry.lines}
|
|
@@ -384,9 +384,9 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
384
384
|
label={t(M['manufacturing.bom_editor.sub_bill_label'], { component: line.componentName })}
|
|
385
385
|
/>
|
|
386
386
|
{:else if entry?.state === 'failed'}
|
|
387
|
-
<p class="bom-
|
|
387
|
+
<p class="smrt-bom-editor__note" data-smrt-part="description" role="alert">{t(M['manufacturing.bom_editor.load_failed'])}</p>
|
|
388
388
|
{:else}
|
|
389
|
-
<p class="bom-
|
|
389
|
+
<p class="smrt-bom-editor__note" data-smrt-part="description" role="status">{t(M['manufacturing.bom_editor.loading'])}</p>
|
|
390
390
|
{/if}
|
|
391
391
|
</div>
|
|
392
392
|
</td>
|
|
@@ -399,10 +399,10 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
399
399
|
{/if}
|
|
400
400
|
|
|
401
401
|
{#if onadd && components}
|
|
402
|
-
<section class="bom-
|
|
403
|
-
<h3 id="{uid}-add-heading" class="bom-
|
|
402
|
+
<section class="smrt-bom-editor__add" data-smrt-part="submit" aria-labelledby="{uid}-add-heading">
|
|
403
|
+
<h3 id="{uid}-add-heading" class="smrt-bom-editor__add-heading" data-smrt-part="title">{t(M['manufacturing.bom_editor.add_heading'])}</h3>
|
|
404
404
|
<Form class="bom-editor-add-form" onsubmit={add}>
|
|
405
|
-
<div class="
|
|
405
|
+
<div class="smrt-bom-editor__field smrt-bom-editor__field-component" data-smrt-part="field">
|
|
406
406
|
<label for="{uid}-add-component">{t(M['manufacturing.bom_editor.component'])}</label>
|
|
407
407
|
<Select
|
|
408
408
|
id="{uid}-add-component"
|
|
@@ -418,7 +418,7 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
418
418
|
{/each}
|
|
419
419
|
</Select>
|
|
420
420
|
</div>
|
|
421
|
-
<div class="field">
|
|
421
|
+
<div class="smrt-bom-editor__field" data-smrt-part="field">
|
|
422
422
|
<label for="{uid}-add-qty">{t(M['manufacturing.bom_editor.qty_per_unit'])}</label>
|
|
423
423
|
<Input
|
|
424
424
|
id="{uid}-add-qty"
|
|
@@ -432,7 +432,7 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
432
432
|
aria-describedby={addInvalid.length > 0 ? `${uid}-add-errors` : undefined}
|
|
433
433
|
/>
|
|
434
434
|
</div>
|
|
435
|
-
<div class="field">
|
|
435
|
+
<div class="smrt-bom-editor__field" data-smrt-part="field">
|
|
436
436
|
<label for="{uid}-add-uom">{t(M['manufacturing.bom_editor.uom'])}</label>
|
|
437
437
|
<Input
|
|
438
438
|
id="{uid}-add-uom"
|
|
@@ -444,7 +444,7 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
444
444
|
aria-describedby={addInvalid.length > 0 ? `${uid}-add-errors` : undefined}
|
|
445
445
|
/>
|
|
446
446
|
</div>
|
|
447
|
-
<div class="field">
|
|
447
|
+
<div class="smrt-bom-editor__field" data-smrt-part="field">
|
|
448
448
|
<label for="{uid}-add-waste">{t(M['manufacturing.bom_editor.waste_percent'])}</label>
|
|
449
449
|
<Input
|
|
450
450
|
id="{uid}-add-waste"
|
|
@@ -458,12 +458,12 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
458
458
|
aria-describedby={addInvalid.length > 0 ? `${uid}-add-errors` : undefined}
|
|
459
459
|
/>
|
|
460
460
|
</div>
|
|
461
|
-
<div class="
|
|
461
|
+
<div class="smrt-bom-editor__field smrt-bom-editor__field-submit" data-smrt-part="field">
|
|
462
462
|
<Button type="submit" disabled={blocked}>{t(M['manufacturing.bom_editor.add'])}</Button>
|
|
463
463
|
</div>
|
|
464
464
|
</Form>
|
|
465
465
|
{#if addInvalid.length > 0}
|
|
466
|
-
<ul class="bom-
|
|
466
|
+
<ul class="smrt-bom-editor__errors" data-smrt-part="error" id="{uid}-add-errors">
|
|
467
467
|
{#each addInvalid as field (field)}
|
|
468
468
|
<li>{errorText(field)}</li>
|
|
469
469
|
{/each}
|
|
@@ -475,23 +475,19 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
475
475
|
|
|
476
476
|
<style>
|
|
477
477
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
478
|
-
@layer smrt.
|
|
479
|
-
.bom-
|
|
478
|
+
@layer smrt.structure {
|
|
479
|
+
.smrt-bom-editor__root {
|
|
480
480
|
display: flex;
|
|
481
481
|
flex-direction: column;
|
|
482
482
|
gap: 1rem;
|
|
483
483
|
}
|
|
484
|
-
|
|
485
|
-
.bom-editor-scroll {
|
|
484
|
+
.smrt-bom-editor__scroll {
|
|
486
485
|
overflow-x: auto;
|
|
487
486
|
}
|
|
488
|
-
|
|
489
|
-
.bom-editor-table {
|
|
487
|
+
.smrt-bom-editor__table {
|
|
490
488
|
width: 100%;
|
|
491
|
-
border-collapse: collapse;
|
|
492
489
|
}
|
|
493
|
-
|
|
494
|
-
.bom-editor-caption {
|
|
490
|
+
.smrt-bom-editor__caption {
|
|
495
491
|
position: absolute;
|
|
496
492
|
width: 1px;
|
|
497
493
|
height: 1px;
|
|
@@ -499,80 +495,86 @@ const ancestors = $derived(bomId ? [bomId] : []);
|
|
|
499
495
|
clip-path: inset(50%);
|
|
500
496
|
white-space: nowrap;
|
|
501
497
|
}
|
|
502
|
-
|
|
503
|
-
.bom-
|
|
504
|
-
.bom-editor-table td {
|
|
498
|
+
.smrt-bom-editor__table th,
|
|
499
|
+
.smrt-bom-editor__table td {
|
|
505
500
|
padding: 0.5rem 0.75rem;
|
|
506
|
-
text-align: left;
|
|
507
|
-
vertical-align: top;
|
|
508
|
-
border-bottom: var(--smrt-hairline);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.bom-editor-table thead th {
|
|
512
|
-
font-size: var(--smrt-typography-label-medium-size, 0.75rem);
|
|
513
|
-
font-weight: var(--smrt-typography-label-medium-weight, 500);
|
|
514
|
-
color: var(--smrt-color-on-surface-variant, inherit);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
.bom-editor-component {
|
|
518
|
-
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
519
501
|
}
|
|
520
|
-
|
|
521
|
-
.bom-
|
|
522
|
-
.bom-editor-actions {
|
|
502
|
+
.smrt-bom-editor__kind,
|
|
503
|
+
.smrt-bom-editor__actions {
|
|
523
504
|
display: flex;
|
|
524
505
|
flex-wrap: wrap;
|
|
525
506
|
align-items: center;
|
|
526
507
|
gap: 0.5rem;
|
|
527
508
|
}
|
|
528
|
-
|
|
529
|
-
.bom-
|
|
530
|
-
font-variant-numeric: tabular-nums;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
.bom-editor-note,
|
|
534
|
-
.bom-editor-empty {
|
|
509
|
+
.smrt-bom-editor__note,
|
|
510
|
+
.smrt-bom-editor__empty {
|
|
535
511
|
margin: 0;
|
|
536
|
-
color: var(--smrt-color-on-surface-variant, inherit);
|
|
537
512
|
}
|
|
538
|
-
|
|
539
|
-
.bom-editor-sub-bill {
|
|
513
|
+
.smrt-bom-editor__sub-bill {
|
|
540
514
|
padding-left: 1rem;
|
|
541
|
-
border-left: 2px solid var(--smrt-color-outline-variant, transparent);
|
|
542
515
|
}
|
|
543
|
-
|
|
544
|
-
.bom-editor-errors {
|
|
516
|
+
.smrt-bom-editor__errors {
|
|
545
517
|
margin: 0.25rem 0 0;
|
|
546
518
|
padding-left: 1rem;
|
|
547
|
-
color: var(--smrt-color-error, inherit);
|
|
548
519
|
}
|
|
549
|
-
|
|
550
|
-
.bom-editor-add-heading {
|
|
520
|
+
.smrt-bom-editor__add-heading {
|
|
551
521
|
margin: 0 0 0.5rem;
|
|
552
|
-
font-size: var(--smrt-typography-title-small-size, 0.875rem);
|
|
553
|
-
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
554
522
|
}
|
|
555
|
-
|
|
556
|
-
.bom-editor-add :global(.bom-editor-add-form) {
|
|
523
|
+
.smrt-bom-editor__add :global(.bom-editor-add-form) {
|
|
557
524
|
display: flex;
|
|
558
525
|
flex-wrap: wrap;
|
|
559
526
|
align-items: flex-end;
|
|
560
527
|
gap: 0.75rem;
|
|
561
528
|
}
|
|
562
|
-
|
|
563
|
-
.field {
|
|
529
|
+
.smrt-bom-editor__field {
|
|
564
530
|
display: flex;
|
|
565
531
|
flex-direction: column;
|
|
566
532
|
gap: 0.25rem;
|
|
567
533
|
}
|
|
568
|
-
|
|
569
|
-
.field-component {
|
|
534
|
+
.smrt-bom-editor__field-component {
|
|
570
535
|
flex: 1 1 14rem;
|
|
571
536
|
}
|
|
537
|
+
}
|
|
572
538
|
|
|
573
|
-
|
|
539
|
+
@layer smrt.theme {
|
|
540
|
+
.smrt-bom-editor__table {
|
|
541
|
+
border-collapse: collapse;
|
|
542
|
+
}
|
|
543
|
+
.smrt-bom-editor__table th,
|
|
544
|
+
.smrt-bom-editor__table td {
|
|
545
|
+
text-align: left;
|
|
546
|
+
vertical-align: top;
|
|
547
|
+
border-bottom: var(--smrt-hairline);
|
|
548
|
+
}
|
|
549
|
+
.smrt-bom-editor__table thead th {
|
|
550
|
+
font-size: var(--smrt-typography-label-medium-size, 0.75rem);
|
|
551
|
+
font-weight: var(--smrt-typography-label-medium-weight, 500);
|
|
552
|
+
color: var(--smrt-color-on-surface-variant, inherit);
|
|
553
|
+
}
|
|
554
|
+
.smrt-bom-editor__component {
|
|
555
|
+
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
556
|
+
}
|
|
557
|
+
.smrt-bom-editor__number {
|
|
558
|
+
font-variant-numeric: tabular-nums;
|
|
559
|
+
}
|
|
560
|
+
.smrt-bom-editor__note,
|
|
561
|
+
.smrt-bom-editor__empty {
|
|
562
|
+
color: var(--smrt-color-on-surface-variant, inherit);
|
|
563
|
+
}
|
|
564
|
+
.smrt-bom-editor__sub-bill {
|
|
565
|
+
border-left: 2px solid var(--smrt-color-outline-variant, transparent);
|
|
566
|
+
}
|
|
567
|
+
.smrt-bom-editor__errors {
|
|
568
|
+
color: var(--smrt-color-error, inherit);
|
|
569
|
+
}
|
|
570
|
+
.smrt-bom-editor__add-heading {
|
|
571
|
+
font-size: var(--smrt-typography-title-small-size, 0.875rem);
|
|
572
|
+
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
573
|
+
}
|
|
574
|
+
.smrt-bom-editor__field label {
|
|
574
575
|
font-size: var(--smrt-typography-label-medium-size, 0.75rem);
|
|
575
576
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
576
577
|
}
|
|
577
578
|
}
|
|
579
|
+
|
|
578
580
|
</style>
|
|
@@ -64,7 +64,7 @@ async function toggle(line: BomEditorLine) {
|
|
|
64
64
|
}
|
|
65
65
|
</script>
|
|
66
66
|
|
|
67
|
-
<ul class="bom-
|
|
67
|
+
<ul class="smrt-bom-structure-tree__root" aria-label={label} data-smrt-component="BomStructureTree">
|
|
68
68
|
{#each lines as line (line.id)}
|
|
69
69
|
{@const canOpen =
|
|
70
70
|
line.kind === 'assembly' &&
|
|
@@ -72,15 +72,15 @@ async function toggle(line: BomEditorLine) {
|
|
|
72
72
|
loadBill !== undefined &&
|
|
73
73
|
!ancestors.includes(line.subBomId)}
|
|
74
74
|
{@const subId = `${uid}-${line.id}`}
|
|
75
|
-
<li class="bom-
|
|
76
|
-
<div class="bom-
|
|
77
|
-
<span class="bom-
|
|
75
|
+
<li class="smrt-bom-structure-tree__line" data-smrt-part="item">
|
|
76
|
+
<div class="smrt-bom-structure-tree__row" data-smrt-part="row">
|
|
77
|
+
<span class="smrt-bom-structure-tree__component" data-smrt-part="title">{componentText(line)}</span>
|
|
78
78
|
<Badge size="sm" variant={line.kind === 'missing' ? 'error' : 'default'}>
|
|
79
79
|
{t(componentKindLabelKey(line.kind))}
|
|
80
80
|
</Badge>
|
|
81
|
-
<span class="bom-
|
|
81
|
+
<span class="smrt-bom-structure-tree__qty" data-smrt-part="value">{line.qtyPerUnit} {line.uom}</span>
|
|
82
82
|
{#if line.kind === 'assembly' && line.subBomId === null}
|
|
83
|
-
<span class="bom-
|
|
83
|
+
<span class="smrt-bom-structure-tree__note" data-smrt-part="description">{t(M['manufacturing.bom_editor.no_bill'])}</span>
|
|
84
84
|
{/if}
|
|
85
85
|
{#if canOpen}
|
|
86
86
|
<Button
|
|
@@ -106,7 +106,7 @@ async function toggle(line: BomEditorLine) {
|
|
|
106
106
|
</div>
|
|
107
107
|
{#if canOpen && open[line.id] && line.subBomId}
|
|
108
108
|
{@const entry = loaded[line.subBomId]}
|
|
109
|
-
<div id={subId} class="bom-
|
|
109
|
+
<div id={subId} class="smrt-bom-structure-tree__children" data-smrt-part="list">
|
|
110
110
|
{#if entry?.state === 'ready'}
|
|
111
111
|
<BomStructureTree
|
|
112
112
|
lines={entry.lines}
|
|
@@ -115,9 +115,9 @@ async function toggle(line: BomEditorLine) {
|
|
|
115
115
|
label={t(M['manufacturing.bom_editor.sub_bill_label'], { component: line.componentName })}
|
|
116
116
|
/>
|
|
117
117
|
{:else if entry?.state === 'failed'}
|
|
118
|
-
<p class="bom-
|
|
118
|
+
<p class="smrt-bom-structure-tree__note" data-smrt-part="description" role="alert">{t(M['manufacturing.bom_editor.load_failed'])}</p>
|
|
119
119
|
{:else}
|
|
120
|
-
<p class="bom-
|
|
120
|
+
<p class="smrt-bom-structure-tree__note" data-smrt-part="description" role="status">{t(M['manufacturing.bom_editor.loading'])}</p>
|
|
121
121
|
{/if}
|
|
122
122
|
</div>
|
|
123
123
|
{/if}
|
|
@@ -127,41 +127,43 @@ async function toggle(line: BomEditorLine) {
|
|
|
127
127
|
|
|
128
128
|
<style>
|
|
129
129
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
130
|
-
@layer smrt.
|
|
131
|
-
.bom-
|
|
130
|
+
@layer smrt.structure {
|
|
131
|
+
.smrt-bom-structure-tree__root {
|
|
132
132
|
list-style: none;
|
|
133
133
|
margin: 0;
|
|
134
134
|
padding: 0;
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
.bom-tree-line {
|
|
136
|
+
.smrt-bom-structure-tree__line {
|
|
138
137
|
padding: 0.25rem 0;
|
|
139
138
|
}
|
|
140
|
-
|
|
141
|
-
.bom-tree-row {
|
|
139
|
+
.smrt-bom-structure-tree__row {
|
|
142
140
|
display: flex;
|
|
143
141
|
flex-wrap: wrap;
|
|
144
142
|
align-items: center;
|
|
145
143
|
gap: 0.5rem;
|
|
146
144
|
}
|
|
145
|
+
.smrt-bom-structure-tree__note {
|
|
146
|
+
margin: 0;
|
|
147
|
+
}
|
|
148
|
+
.smrt-bom-structure-tree__children {
|
|
149
|
+
margin-left: 1rem;
|
|
150
|
+
padding-left: 0.75rem;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
147
153
|
|
|
148
|
-
|
|
154
|
+
@layer smrt.theme {
|
|
155
|
+
.smrt-bom-structure-tree__component {
|
|
149
156
|
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
150
157
|
}
|
|
151
|
-
|
|
152
|
-
.bom-tree-qty {
|
|
158
|
+
.smrt-bom-structure-tree__qty {
|
|
153
159
|
font-variant-numeric: tabular-nums;
|
|
154
160
|
}
|
|
155
|
-
|
|
156
|
-
.bom-tree-note {
|
|
157
|
-
margin: 0;
|
|
161
|
+
.smrt-bom-structure-tree__note {
|
|
158
162
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
159
163
|
}
|
|
160
|
-
|
|
161
|
-
.bom-tree-children {
|
|
162
|
-
margin-left: 1rem;
|
|
163
|
-
padding-left: 0.75rem;
|
|
164
|
+
.smrt-bom-structure-tree__children {
|
|
164
165
|
border-left: 2px solid var(--smrt-color-outline-variant, transparent);
|
|
165
166
|
}
|
|
166
167
|
}
|
|
168
|
+
|
|
167
169
|
</style>
|
|
@@ -107,11 +107,11 @@ function handleSubmit() {
|
|
|
107
107
|
}
|
|
108
108
|
</script>
|
|
109
109
|
|
|
110
|
-
<div class="operation-
|
|
110
|
+
<div class="smrt-operation-form__root" data-smrt-component="OperationForm">
|
|
111
111
|
<Form class="operation-form" onsubmit={handleSubmit}>
|
|
112
|
-
<div class="field">
|
|
112
|
+
<div class="smrt-operation-form__field" data-smrt-part="field">
|
|
113
113
|
<label for="{uid}-code">
|
|
114
|
-
{t(M['manufacturing.operation_form.code'])}<span class="
|
|
114
|
+
{t(M['manufacturing.operation_form.code'])}<span class="smrt-operation-form__required" data-smrt-part="marker" aria-hidden="true">*</span>
|
|
115
115
|
</label>
|
|
116
116
|
<Input
|
|
117
117
|
id="{uid}-code"
|
|
@@ -125,15 +125,15 @@ function handleSubmit() {
|
|
|
125
125
|
aria-describedby={describedBy('code', isNew ? undefined : `${uid}-code-hint`)}
|
|
126
126
|
/>
|
|
127
127
|
{#if !isNew}
|
|
128
|
-
<span class="
|
|
128
|
+
<span class="smrt-operation-form__hint" data-smrt-part="description" id="{uid}-code-hint">
|
|
129
129
|
{t(M['manufacturing.operation_form.code_edit_help'])}
|
|
130
130
|
</span>
|
|
131
131
|
{/if}
|
|
132
132
|
</div>
|
|
133
133
|
|
|
134
|
-
<div class="field">
|
|
134
|
+
<div class="smrt-operation-form__field" data-smrt-part="field">
|
|
135
135
|
<label for="{uid}-name">
|
|
136
|
-
{t(M['manufacturing.operation_form.name'])}<span class="
|
|
136
|
+
{t(M['manufacturing.operation_form.name'])}<span class="smrt-operation-form__required" data-smrt-part="marker" aria-hidden="true">*</span>
|
|
137
137
|
</label>
|
|
138
138
|
<Input
|
|
139
139
|
id="{uid}-name"
|
|
@@ -147,7 +147,7 @@ function handleSubmit() {
|
|
|
147
147
|
/>
|
|
148
148
|
</div>
|
|
149
149
|
|
|
150
|
-
<div class="field">
|
|
150
|
+
<div class="smrt-operation-form__field" data-smrt-part="field">
|
|
151
151
|
<label for="{uid}-category">{t(M['manufacturing.operation_form.category'])}</label>
|
|
152
152
|
<Input
|
|
153
153
|
id="{uid}-category"
|
|
@@ -164,12 +164,12 @@ function handleSubmit() {
|
|
|
164
164
|
<option value={suggestion}></option>
|
|
165
165
|
{/each}
|
|
166
166
|
</datalist>
|
|
167
|
-
<span class="
|
|
167
|
+
<span class="smrt-operation-form__hint" data-smrt-part="description" id="{uid}-category-hint">
|
|
168
168
|
{t(M['manufacturing.operation_form.category_help'])}
|
|
169
169
|
</span>
|
|
170
170
|
</div>
|
|
171
171
|
|
|
172
|
-
<div class="field">
|
|
172
|
+
<div class="smrt-operation-form__field" data-smrt-part="field">
|
|
173
173
|
<label for="{uid}-qualification">{t(M['manufacturing.operation_form.qualification'])}</label>
|
|
174
174
|
<Input
|
|
175
175
|
id="{uid}-qualification"
|
|
@@ -179,13 +179,13 @@ function handleSubmit() {
|
|
|
179
179
|
disabled={loading}
|
|
180
180
|
aria-describedby="{uid}-qualification-hint"
|
|
181
181
|
/>
|
|
182
|
-
<span class="
|
|
182
|
+
<span class="smrt-operation-form__hint" data-smrt-part="description" id="{uid}-qualification-hint">
|
|
183
183
|
{t(M['manufacturing.operation_form.qualification_help'])}
|
|
184
184
|
</span>
|
|
185
185
|
</div>
|
|
186
186
|
|
|
187
187
|
{#if errors.length > 0}
|
|
188
|
-
<div class="
|
|
188
|
+
<div class="smrt-operation-form__errors" data-smrt-part="error" role="alert">
|
|
189
189
|
<ul>
|
|
190
190
|
{#each errors as error (error.field)}
|
|
191
191
|
<li id={errorId(error.field)}>{error.message}</li>
|
|
@@ -194,7 +194,7 @@ function handleSubmit() {
|
|
|
194
194
|
</div>
|
|
195
195
|
{/if}
|
|
196
196
|
|
|
197
|
-
<div class="actions">
|
|
197
|
+
<div class="smrt-operation-form__actions" data-smrt-part="actions">
|
|
198
198
|
{#if oncancel}
|
|
199
199
|
<Button variant="secondary" type="button" onclick={oncancel} disabled={loading}>
|
|
200
200
|
{t(M['manufacturing.operation_form.cancel'])}
|
|
@@ -215,47 +215,44 @@ function handleSubmit() {
|
|
|
215
215
|
|
|
216
216
|
<style>
|
|
217
217
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
218
|
-
@layer smrt.
|
|
219
|
-
.operation-
|
|
218
|
+
@layer smrt.structure {
|
|
219
|
+
.smrt-operation-form__root :global(.operation-form) {
|
|
220
220
|
display: flex;
|
|
221
221
|
flex-direction: column;
|
|
222
222
|
gap: var(--smrt-spacing-md, 1rem);
|
|
223
223
|
}
|
|
224
|
-
|
|
225
|
-
.field {
|
|
224
|
+
.smrt-operation-form__field {
|
|
226
225
|
display: flex;
|
|
227
226
|
flex-direction: column;
|
|
228
227
|
gap: 0.25rem;
|
|
229
228
|
}
|
|
229
|
+
.smrt-operation-form__errors ul {
|
|
230
|
+
margin: 0;
|
|
231
|
+
padding-left: 1.25rem;
|
|
232
|
+
}
|
|
233
|
+
.smrt-operation-form__actions {
|
|
234
|
+
display: flex;
|
|
235
|
+
justify-content: flex-end;
|
|
236
|
+
gap: var(--smrt-spacing-sm, 0.5rem);
|
|
237
|
+
margin-top: var(--smrt-spacing-sm, 0.5rem);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
230
240
|
|
|
241
|
+
@layer smrt.theme {
|
|
231
242
|
label {
|
|
232
243
|
font: var(--smrt-typography-body-medium-font, 500 0.875rem / 1.25 sans-serif);
|
|
233
244
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
234
245
|
}
|
|
235
|
-
|
|
236
|
-
.required {
|
|
246
|
+
.smrt-operation-form__required {
|
|
237
247
|
color: var(--smrt-color-error, inherit);
|
|
238
248
|
}
|
|
239
|
-
|
|
240
|
-
.hint {
|
|
249
|
+
.smrt-operation-form__hint {
|
|
241
250
|
font: var(--smrt-typography-body-small-font, 0.75rem / 1.25 sans-serif);
|
|
242
251
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
243
252
|
}
|
|
244
|
-
|
|
245
|
-
.errors {
|
|
253
|
+
.smrt-operation-form__errors {
|
|
246
254
|
color: var(--smrt-color-error, inherit);
|
|
247
255
|
}
|
|
248
|
-
|
|
249
|
-
.errors ul {
|
|
250
|
-
margin: 0;
|
|
251
|
-
padding-left: 1.25rem;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.actions {
|
|
255
|
-
display: flex;
|
|
256
|
-
justify-content: flex-end;
|
|
257
|
-
gap: var(--smrt-spacing-sm, 0.5rem);
|
|
258
|
-
margin-top: var(--smrt-spacing-sm, 0.5rem);
|
|
259
|
-
}
|
|
260
256
|
}
|
|
257
|
+
|
|
261
258
|
</style>
|
|
@@ -40,13 +40,13 @@ const showActions = $derived(Boolean(onretire || onreinstate));
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
{#if operations.length === 0}
|
|
43
|
-
<p class="operation-
|
|
43
|
+
<p class="smrt-operation-list__empty" data-smrt-component="OperationList">
|
|
44
44
|
{emptyMessage ?? t(M['manufacturing.operation_list.empty'])}
|
|
45
45
|
</p>
|
|
46
46
|
{:else}
|
|
47
|
-
<div class="operation-
|
|
48
|
-
<table class="operation-
|
|
49
|
-
<caption class="operation-
|
|
47
|
+
<div class="smrt-operation-list__root" data-smrt-component="OperationList">
|
|
48
|
+
<table class="smrt-operation-list__table" data-smrt-part="table">
|
|
49
|
+
<caption class="smrt-operation-list__caption" data-smrt-part="caption">{t(M['manufacturing.operation_list.caption'])}</caption>
|
|
50
50
|
<thead>
|
|
51
51
|
<tr>
|
|
52
52
|
<th scope="col">{t(M['manufacturing.operation_list.code'])}</th>
|
|
@@ -61,7 +61,7 @@ const showActions = $derived(Boolean(onretire || onreinstate));
|
|
|
61
61
|
<tbody>
|
|
62
62
|
{#each operations as operation (operation.id)}
|
|
63
63
|
<tr>
|
|
64
|
-
<th scope="row" class="operation-
|
|
64
|
+
<th scope="row" class="smrt-operation-list__code" data-smrt-part="body">{operation.code}</th>
|
|
65
65
|
<td>
|
|
66
66
|
{#if onselect}
|
|
67
67
|
<Button
|
|
@@ -80,7 +80,7 @@ const showActions = $derived(Boolean(onretire || onreinstate));
|
|
|
80
80
|
{#if operation.category}
|
|
81
81
|
{operation.category}
|
|
82
82
|
{:else}
|
|
83
|
-
<span class="operation-
|
|
83
|
+
<span class="smrt-operation-list__none" data-smrt-part="empty">{t(M['manufacturing.operation_list.none'])}</span>
|
|
84
84
|
{/if}
|
|
85
85
|
</td>
|
|
86
86
|
<td>
|
|
@@ -124,17 +124,14 @@ const showActions = $derived(Boolean(onretire || onreinstate));
|
|
|
124
124
|
|
|
125
125
|
<style>
|
|
126
126
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
127
|
-
@layer smrt.
|
|
128
|
-
.operation-
|
|
127
|
+
@layer smrt.structure {
|
|
128
|
+
.smrt-operation-list__root {
|
|
129
129
|
overflow-x: auto;
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
.operation-list {
|
|
131
|
+
.smrt-operation-list__table {
|
|
133
132
|
width: 100%;
|
|
134
|
-
border-collapse: collapse;
|
|
135
133
|
}
|
|
136
|
-
|
|
137
|
-
.operation-list-caption {
|
|
134
|
+
.smrt-operation-list__caption {
|
|
138
135
|
position: absolute;
|
|
139
136
|
width: 1px;
|
|
140
137
|
height: 1px;
|
|
@@ -142,32 +139,37 @@ const showActions = $derived(Boolean(onretire || onreinstate));
|
|
|
142
139
|
clip-path: inset(50%);
|
|
143
140
|
white-space: nowrap;
|
|
144
141
|
}
|
|
145
|
-
|
|
146
|
-
.operation-
|
|
147
|
-
.operation-list td {
|
|
142
|
+
.smrt-operation-list__table th,
|
|
143
|
+
.smrt-operation-list__table td {
|
|
148
144
|
padding: 0.5rem 0.75rem;
|
|
145
|
+
}
|
|
146
|
+
.smrt-operation-list__empty {
|
|
147
|
+
padding: 1rem 0;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@layer smrt.theme {
|
|
152
|
+
.smrt-operation-list__table {
|
|
153
|
+
border-collapse: collapse;
|
|
154
|
+
}
|
|
155
|
+
.smrt-operation-list__table th,
|
|
156
|
+
.smrt-operation-list__table td {
|
|
149
157
|
text-align: left;
|
|
150
158
|
border-bottom: var(--smrt-hairline);
|
|
151
159
|
}
|
|
152
|
-
|
|
153
|
-
.operation-list thead th {
|
|
160
|
+
.smrt-operation-list__table thead th {
|
|
154
161
|
font-size: var(--smrt-typography-label-small-size, 0.75rem);
|
|
155
162
|
font-weight: var(--smrt-typography-label-small-weight, 500);
|
|
156
163
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
157
164
|
}
|
|
158
|
-
|
|
159
|
-
.operation-list-code {
|
|
165
|
+
.smrt-operation-list__code {
|
|
160
166
|
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
161
167
|
font-variant-numeric: tabular-nums;
|
|
162
168
|
}
|
|
163
|
-
|
|
164
|
-
.operation-
|
|
165
|
-
.operation-list-empty {
|
|
169
|
+
.smrt-operation-list__none,
|
|
170
|
+
.smrt-operation-list__empty {
|
|
166
171
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
167
172
|
}
|
|
168
|
-
|
|
169
|
-
.operation-list-empty {
|
|
170
|
-
padding: 1rem 0;
|
|
171
|
-
}
|
|
172
173
|
}
|
|
174
|
+
|
|
173
175
|
</style>
|