@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
|
@@ -172,13 +172,13 @@ async function confirmAction() {
|
|
|
172
172
|
</script>
|
|
173
173
|
|
|
174
174
|
{#if runs.length === 0}
|
|
175
|
-
<p class="run-
|
|
175
|
+
<p class="smrt-production-run-list__empty" data-smrt-component="ProductionRunList">
|
|
176
176
|
{emptyMessage ?? t(M['manufacturing.production_run_list.empty'])}
|
|
177
177
|
</p>
|
|
178
178
|
{:else}
|
|
179
|
-
<div class="run-
|
|
180
|
-
<table class="run-
|
|
181
|
-
<caption class="run-
|
|
179
|
+
<div class="smrt-production-run-list__root" data-smrt-component="ProductionRunList">
|
|
180
|
+
<table class="smrt-production-run-list__table" data-smrt-part="table">
|
|
181
|
+
<caption class="smrt-production-run-list__caption" data-smrt-part="caption">{t(M['manufacturing.production_run_list.caption'])}</caption>
|
|
182
182
|
<thead>
|
|
183
183
|
<tr>
|
|
184
184
|
<th scope="col">{t(M['manufacturing.production_run_list.build'])}</th>
|
|
@@ -201,7 +201,7 @@ async function confirmAction() {
|
|
|
201
201
|
{@const errorId = `${uid}-${run.id}-error`}
|
|
202
202
|
<tr>
|
|
203
203
|
<th scope="row">{run.label}</th>
|
|
204
|
-
<td class="run-
|
|
204
|
+
<td class="smrt-production-run-list__progress" data-smrt-part="progress">
|
|
205
205
|
<ProgressBar
|
|
206
206
|
value={run.completedQty}
|
|
207
207
|
max={run.targetQty > 0 ? run.targetQty : 1}
|
|
@@ -247,7 +247,7 @@ async function confirmAction() {
|
|
|
247
247
|
</Button>
|
|
248
248
|
</Form>
|
|
249
249
|
{#if errors[run.id]}
|
|
250
|
-
<p class="run-
|
|
250
|
+
<p class="smrt-production-run-list__error" data-smrt-part="error" id={errorId} role="alert">{errors[run.id]}</p>
|
|
251
251
|
{/if}
|
|
252
252
|
{/if}
|
|
253
253
|
</td>
|
|
@@ -256,7 +256,7 @@ async function confirmAction() {
|
|
|
256
256
|
{@const manageErrorId = `${uid}-${run.id}-manage-error`}
|
|
257
257
|
<td>
|
|
258
258
|
{#if isProductionRunOpen(run.status)}
|
|
259
|
-
<div class="run-
|
|
259
|
+
<div class="smrt-production-run-list__manage" data-smrt-part="field">
|
|
260
260
|
{#if onsettarget}
|
|
261
261
|
<Form class="run-list-report" onsubmit={() => setTarget(run)}>
|
|
262
262
|
<Input
|
|
@@ -286,7 +286,7 @@ async function confirmAction() {
|
|
|
286
286
|
</Form>
|
|
287
287
|
{/if}
|
|
288
288
|
{#if onfinish || oncancel}
|
|
289
|
-
<div class="run-
|
|
289
|
+
<div class="smrt-production-run-list__actions" data-smrt-part="actions">
|
|
290
290
|
{#if onfinish}
|
|
291
291
|
<Button
|
|
292
292
|
type="button"
|
|
@@ -315,7 +315,7 @@ async function confirmAction() {
|
|
|
315
315
|
{/if}
|
|
316
316
|
</div>
|
|
317
317
|
{#if manageErrors[run.id]}
|
|
318
|
-
<p class="run-
|
|
318
|
+
<p class="smrt-production-run-list__error" data-smrt-part="error" id={manageErrorId} role="alert">{manageErrors[run.id]}</p>
|
|
319
319
|
{/if}
|
|
320
320
|
{/if}
|
|
321
321
|
</td>
|
|
@@ -349,64 +349,69 @@ async function confirmAction() {
|
|
|
349
349
|
|
|
350
350
|
<style>
|
|
351
351
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
352
|
-
@layer smrt.
|
|
353
|
-
.run-
|
|
352
|
+
@layer smrt.structure {
|
|
353
|
+
.smrt-production-run-list__root {
|
|
354
354
|
overflow-x: auto;
|
|
355
355
|
}
|
|
356
|
-
|
|
357
|
-
.run-list {
|
|
356
|
+
.smrt-production-run-list__table {
|
|
358
357
|
width: 100%;
|
|
359
|
-
border-collapse: collapse;
|
|
360
358
|
}
|
|
361
|
-
|
|
362
|
-
.run-list-caption {
|
|
363
|
-
text-align: left;
|
|
364
|
-
font-weight: var(--smrt-typography-title-medium-weight, 500);
|
|
359
|
+
.smrt-production-run-list__caption {
|
|
365
360
|
padding-bottom: 0.5rem;
|
|
366
361
|
}
|
|
367
|
-
|
|
368
|
-
.run-
|
|
369
|
-
.run-list td {
|
|
362
|
+
.smrt-production-run-list__table th,
|
|
363
|
+
.smrt-production-run-list__table td {
|
|
370
364
|
padding: 0.5rem;
|
|
371
|
-
text-align: left;
|
|
372
|
-
vertical-align: top;
|
|
373
|
-
border-bottom: var(--smrt-hairline);
|
|
374
365
|
}
|
|
375
|
-
|
|
376
|
-
.run-list-progress {
|
|
366
|
+
.smrt-production-run-list__progress {
|
|
377
367
|
min-width: 10rem;
|
|
378
368
|
}
|
|
379
|
-
|
|
380
|
-
.run-list :global(.run-list-report) {
|
|
369
|
+
.smrt-production-run-list__table :global(.run-list-report) {
|
|
381
370
|
display: flex;
|
|
382
371
|
gap: 0.5rem;
|
|
383
372
|
align-items: center;
|
|
384
373
|
}
|
|
385
|
-
|
|
386
|
-
.run-list :global(.run-list-report input) {
|
|
374
|
+
.smrt-production-run-list__table :global(.run-list-report input) {
|
|
387
375
|
width: 6rem;
|
|
388
376
|
}
|
|
389
|
-
|
|
390
|
-
.run-list-manage {
|
|
377
|
+
.smrt-production-run-list__manage {
|
|
391
378
|
display: flex;
|
|
392
379
|
flex-wrap: wrap;
|
|
393
380
|
gap: 0.5rem;
|
|
394
381
|
align-items: center;
|
|
395
382
|
}
|
|
396
|
-
|
|
397
|
-
.run-list-actions {
|
|
383
|
+
.smrt-production-run-list__actions {
|
|
398
384
|
display: flex;
|
|
399
385
|
gap: 0.5rem;
|
|
400
386
|
}
|
|
401
|
-
|
|
402
|
-
.run-list-error {
|
|
387
|
+
.smrt-production-run-list__error {
|
|
403
388
|
margin: 0.25rem 0 0;
|
|
404
|
-
color: var(--smrt-color-error, inherit);
|
|
405
389
|
}
|
|
406
|
-
|
|
407
|
-
.run-list-empty {
|
|
390
|
+
.smrt-production-run-list__empty {
|
|
408
391
|
margin: 0;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
@layer smrt.theme {
|
|
396
|
+
.smrt-production-run-list__table {
|
|
397
|
+
border-collapse: collapse;
|
|
398
|
+
}
|
|
399
|
+
.smrt-production-run-list__caption {
|
|
400
|
+
text-align: left;
|
|
401
|
+
font-weight: var(--smrt-typography-title-medium-weight, 500);
|
|
402
|
+
}
|
|
403
|
+
.smrt-production-run-list__table th,
|
|
404
|
+
.smrt-production-run-list__table td {
|
|
405
|
+
text-align: left;
|
|
406
|
+
vertical-align: top;
|
|
407
|
+
border-bottom: var(--smrt-hairline);
|
|
408
|
+
}
|
|
409
|
+
.smrt-production-run-list__error {
|
|
410
|
+
color: var(--smrt-color-error, inherit);
|
|
411
|
+
}
|
|
412
|
+
.smrt-production-run-list__empty {
|
|
409
413
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
410
414
|
}
|
|
411
415
|
}
|
|
416
|
+
|
|
412
417
|
</style>
|
|
@@ -46,7 +46,7 @@ function componentText(name: string, skuCode: string): string {
|
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
48
|
{#if lines.length === 0}
|
|
49
|
-
<p class="requirements-
|
|
49
|
+
<p class="smrt-requirements-tree__empty" data-smrt-component="RequirementsTree">{t(M['manufacturing.requirements.empty'])}</p>
|
|
50
50
|
{:else}
|
|
51
51
|
<RequirementsTreeLevel
|
|
52
52
|
{lines}
|
|
@@ -55,8 +55,8 @@ function componentText(name: string, skuCode: string): string {
|
|
|
55
55
|
{/if}
|
|
56
56
|
|
|
57
57
|
{#if totals && totals.length > 0}
|
|
58
|
-
<div class="requirements-
|
|
59
|
-
<table class="requirements-
|
|
58
|
+
<div class="smrt-requirements-tree__root" data-smrt-component="RequirementsTree">
|
|
59
|
+
<table class="smrt-requirements-tree__totals" data-smrt-part="group">
|
|
60
60
|
<caption>{t(M['manufacturing.requirements.totals_caption'])}</caption>
|
|
61
61
|
<thead>
|
|
62
62
|
<tr>
|
|
@@ -72,10 +72,10 @@ function componentText(name: string, skuCode: string): string {
|
|
|
72
72
|
{#each totals as total (total.componentSkuId)}
|
|
73
73
|
<tr>
|
|
74
74
|
<th scope="row">{componentText(total.name, total.skuCode)}</th>
|
|
75
|
-
<td class="requirements-
|
|
75
|
+
<td class="smrt-requirements-tree__number" data-smrt-part="cell">{quantity(total.required)}</td>
|
|
76
76
|
<td>{total.uom}</td>
|
|
77
77
|
{#if showShort}
|
|
78
|
-
<td class="requirements-
|
|
78
|
+
<td class="smrt-requirements-tree__number" data-smrt-part="cell">
|
|
79
79
|
{#if total.short !== null && total.short > 0}
|
|
80
80
|
<Badge size="sm" variant="error">{quantity(total.short)}</Badge>
|
|
81
81
|
{:else}
|
|
@@ -92,37 +92,45 @@ function componentText(name: string, skuCode: string): string {
|
|
|
92
92
|
|
|
93
93
|
<style>
|
|
94
94
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
95
|
-
@layer smrt.
|
|
96
|
-
.requirements-
|
|
95
|
+
@layer smrt.structure {
|
|
96
|
+
.smrt-requirements-tree__empty {
|
|
97
97
|
margin: 0;
|
|
98
|
-
color: var(--smrt-color-on-surface-variant, inherit);
|
|
99
98
|
}
|
|
100
|
-
|
|
101
|
-
.requirements-scroll {
|
|
99
|
+
.smrt-requirements-tree__root {
|
|
102
100
|
overflow-x: auto;
|
|
103
101
|
margin-top: 1rem;
|
|
104
102
|
}
|
|
105
|
-
|
|
106
|
-
.requirements-totals {
|
|
103
|
+
.smrt-requirements-tree__totals {
|
|
107
104
|
width: 100%;
|
|
108
|
-
border-collapse: collapse;
|
|
109
105
|
}
|
|
106
|
+
.smrt-requirements-tree__totals caption {
|
|
107
|
+
padding-bottom: 0.5rem;
|
|
108
|
+
}
|
|
109
|
+
.smrt-requirements-tree__totals th,
|
|
110
|
+
.smrt-requirements-tree__totals td {
|
|
111
|
+
padding: 0.375rem 0.5rem;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
@layer smrt.theme {
|
|
116
|
+
.smrt-requirements-tree__empty {
|
|
117
|
+
color: var(--smrt-color-on-surface-variant, inherit);
|
|
118
|
+
}
|
|
119
|
+
.smrt-requirements-tree__totals {
|
|
120
|
+
border-collapse: collapse;
|
|
121
|
+
}
|
|
122
|
+
.smrt-requirements-tree__totals caption {
|
|
112
123
|
text-align: left;
|
|
113
124
|
font-weight: var(--smrt-typography-title-medium-weight, 500);
|
|
114
|
-
padding-bottom: 0.5rem;
|
|
115
125
|
}
|
|
116
|
-
|
|
117
|
-
.requirements-
|
|
118
|
-
.requirements-totals td {
|
|
119
|
-
padding: 0.375rem 0.5rem;
|
|
126
|
+
.smrt-requirements-tree__totals th,
|
|
127
|
+
.smrt-requirements-tree__totals td {
|
|
120
128
|
text-align: left;
|
|
121
129
|
border-bottom: var(--smrt-hairline);
|
|
122
130
|
}
|
|
123
|
-
|
|
124
|
-
.requirements-number {
|
|
131
|
+
.smrt-requirements-tree__number {
|
|
125
132
|
font-variant-numeric: tabular-nums;
|
|
126
133
|
}
|
|
127
134
|
}
|
|
135
|
+
|
|
128
136
|
</style>
|
|
@@ -34,22 +34,22 @@ function componentText(line: RequirementLineView): string {
|
|
|
34
34
|
}
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
|
-
<ul class="requirements-tree"
|
|
37
|
+
<ul class="smrt-requirements-tree-level__tree" aria-label={label} data-smrt-component="RequirementsTreeLevel">
|
|
38
38
|
{#each lines as line (line.key)}
|
|
39
|
-
<li class="requirements-
|
|
40
|
-
<div class="requirements-row">
|
|
41
|
-
<span class="requirements-
|
|
39
|
+
<li class="smrt-requirements-tree-level__line" data-smrt-part="item" data-level={line.level}>
|
|
40
|
+
<div class="smrt-requirements-tree-level__row" data-smrt-part="row">
|
|
41
|
+
<span class="smrt-requirements-tree-level__component" data-smrt-part="title">{componentText(line)}</span>
|
|
42
42
|
<Badge size="sm" variant={line.kind === 'missing' ? 'error' : 'default'}>
|
|
43
43
|
{t(componentKindLabelKey(line.kind))}
|
|
44
44
|
</Badge>
|
|
45
|
-
<span class="requirements-
|
|
45
|
+
<span class="smrt-requirements-tree-level__qty" data-smrt-part="value">
|
|
46
46
|
{t(M['manufacturing.requirements.required'], {
|
|
47
47
|
qty: quantity(line.required),
|
|
48
48
|
uom: line.uom,
|
|
49
49
|
})}
|
|
50
50
|
</span>
|
|
51
51
|
{#if line.available !== null}
|
|
52
|
-
<span class="requirements-
|
|
52
|
+
<span class="smrt-requirements-tree-level__qty" data-smrt-part="value">
|
|
53
53
|
{t(M['manufacturing.requirements.available'], { qty: quantity(line.available) })}
|
|
54
54
|
</span>
|
|
55
55
|
{/if}
|
|
@@ -59,17 +59,17 @@ function componentText(line: RequirementLineView): string {
|
|
|
59
59
|
{t(M['manufacturing.requirements.short'], { qty: quantity(line.short) })}
|
|
60
60
|
</Badge>
|
|
61
61
|
{:else}
|
|
62
|
-
<span class="requirements-
|
|
62
|
+
<span class="smrt-requirements-tree-level__note" data-smrt-part="description">{t(M['manufacturing.requirements.covered'])}</span>
|
|
63
63
|
{/if}
|
|
64
64
|
{/if}
|
|
65
65
|
{#if line.kind === 'assembly' && !line.buildable}
|
|
66
|
-
<span class="requirements-
|
|
66
|
+
<span class="smrt-requirements-tree-level__note" data-smrt-part="description">{t(M['manufacturing.requirements.no_bill'])}</span>
|
|
67
67
|
{:else if line.buildable && line.children.length === 0 && (line.short ?? 0) > 0}
|
|
68
|
-
<span class="requirements-
|
|
68
|
+
<span class="smrt-requirements-tree-level__note" data-smrt-part="description">{t(M['manufacturing.requirements.buildable'])}</span>
|
|
69
69
|
{/if}
|
|
70
70
|
</div>
|
|
71
71
|
{#if line.children.length > 0}
|
|
72
|
-
<div class="requirements-
|
|
72
|
+
<div class="smrt-requirements-tree-level__children" data-smrt-part="list">
|
|
73
73
|
<RequirementsTreeLevel
|
|
74
74
|
lines={line.children}
|
|
75
75
|
label={t(M['manufacturing.requirements.sub_label'], {
|
|
@@ -84,40 +84,40 @@ function componentText(line: RequirementLineView): string {
|
|
|
84
84
|
|
|
85
85
|
<style>
|
|
86
86
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
87
|
-
@layer smrt.
|
|
88
|
-
.requirements-tree {
|
|
87
|
+
@layer smrt.structure {
|
|
88
|
+
.smrt-requirements-tree-level__tree {
|
|
89
89
|
list-style: none;
|
|
90
90
|
margin: 0;
|
|
91
91
|
padding: 0;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
.requirements-line {
|
|
93
|
+
.smrt-requirements-tree-level__line {
|
|
95
94
|
padding: 0.25rem 0;
|
|
96
95
|
}
|
|
97
|
-
|
|
98
|
-
.requirements-row {
|
|
96
|
+
.smrt-requirements-tree-level__row {
|
|
99
97
|
display: flex;
|
|
100
98
|
flex-wrap: wrap;
|
|
101
99
|
align-items: center;
|
|
102
100
|
gap: 0.5rem;
|
|
103
101
|
}
|
|
102
|
+
.smrt-requirements-tree-level__children {
|
|
103
|
+
margin-left: 1rem;
|
|
104
|
+
padding-left: 0.75rem;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
@layer smrt.theme {
|
|
109
|
+
.smrt-requirements-tree-level__component {
|
|
106
110
|
font-weight: var(--smrt-typography-title-small-weight, 500);
|
|
107
111
|
}
|
|
108
|
-
|
|
109
|
-
.requirements-qty {
|
|
112
|
+
.smrt-requirements-tree-level__qty {
|
|
110
113
|
font-variant-numeric: tabular-nums;
|
|
111
114
|
}
|
|
112
|
-
|
|
113
|
-
.requirements-note {
|
|
115
|
+
.smrt-requirements-tree-level__note {
|
|
114
116
|
color: var(--smrt-color-on-surface-variant, inherit);
|
|
115
117
|
}
|
|
116
|
-
|
|
117
|
-
.requirements-children {
|
|
118
|
-
margin-left: 1rem;
|
|
119
|
-
padding-left: 0.75rem;
|
|
118
|
+
.smrt-requirements-tree-level__children {
|
|
120
119
|
border-left: 2px solid var(--smrt-color-outline-variant, transparent);
|
|
121
120
|
}
|
|
122
121
|
}
|
|
122
|
+
|
|
123
123
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-manufacturing",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.18",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Bills of materials, cost rollup, and production-order operations for the SMRT framework — strictly industry-neutral",
|
|
6
6
|
"type": "module",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"./manifest.json": "./dist/manifest.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@happyvertical/logger": "^0.
|
|
39
|
-
"@happyvertical/smrt-core": "0.60.
|
|
40
|
-
"@happyvertical/smrt-inventory": "0.60.
|
|
41
|
-
"@happyvertical/smrt-products": "0.60.
|
|
42
|
-
"@happyvertical/smrt-tenancy": "0.60.
|
|
43
|
-
"@happyvertical/smrt-types": "0.60.
|
|
44
|
-
"@happyvertical/smrt-ui": "0.60.
|
|
45
|
-
"@happyvertical/sql": "^0.
|
|
38
|
+
"@happyvertical/logger": "^0.112.2",
|
|
39
|
+
"@happyvertical/smrt-core": "0.60.18",
|
|
40
|
+
"@happyvertical/smrt-inventory": "0.60.18",
|
|
41
|
+
"@happyvertical/smrt-products": "0.60.18",
|
|
42
|
+
"@happyvertical/smrt-tenancy": "0.60.18",
|
|
43
|
+
"@happyvertical/smrt-types": "0.60.18",
|
|
44
|
+
"@happyvertical/smrt-ui": "0.60.18",
|
|
45
|
+
"@happyvertical/sql": "^0.112.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"svelte": "^5.57.0"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@happyvertical/smrt-vitest": "0.60.
|
|
56
|
+
"@happyvertical/smrt-vitest": "0.60.18",
|
|
57
57
|
"@sveltejs/package": "^2.5.8",
|
|
58
58
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
59
59
|
"@types/node": "24.13.6",
|