@operato/slot-layout-editor 10.29.87 → 10.29.90
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/src/issue-text.js +1 -1
- package/dist/src/ox-slot-layout-editor.d.ts +10 -0
- package/dist/src/ox-slot-layout-editor.js +85 -36
- package/package.json +5 -5
- package/translations/en.json +7 -4
- package/translations/es.json +7 -4
- package/translations/ja.json +7 -4
- package/translations/ko.json +7 -4
- package/translations/ms.json +7 -4
- package/translations/zh.json +7 -4
package/dist/src/issue-text.js
CHANGED
|
@@ -23,7 +23,7 @@ export const ISSUE_TEXT = {
|
|
|
23
23
|
SLOT_NUMBER_DUPLICATE: 'Slot {slotNo} is used twice',
|
|
24
24
|
NOT_PERSISTABLE: 'Cannot be saved ({value})',
|
|
25
25
|
ACCEPTS_EMPTY: 'The list of types it takes is empty; choose 「Any type」 to take any item',
|
|
26
|
-
FOLLOWS_FACE_TURN: 'A tier
|
|
26
|
+
FOLLOWS_FACE_TURN: 'A tier whose dimensions are a ratio (%) turns by 90° steps only'
|
|
27
27
|
};
|
|
28
28
|
export const t = (key, fallback, opts = {}) => i18next.t(`label.slot-layout.${key}`, { defaultValue: fallback, ...opts });
|
|
29
29
|
/** 자리 공간 경고의 기본 문구. 번역 키는 label.slot-layout.space.{코드} */
|
|
@@ -128,6 +128,13 @@ export declare class OxSlotLayoutEditor extends OxSlotLayoutEditor_base {
|
|
|
128
128
|
private _copyTier;
|
|
129
129
|
private _anchorName;
|
|
130
130
|
private _unit;
|
|
131
|
+
/**
|
|
132
|
+
* What 100 % is for each length of a tier whose dimensions are a ratio of its face (ADR-0051 §4.3 decision 7): the face it
|
|
133
|
+
* was written at, the way `slotLayoutAtFaces` scales them. Position X·Z run along the anchor; pitches, offsets and slot
|
|
134
|
+
* sizes along the tier, which a quarter turn reads the other way round. Height is a ratio only when the room over the face
|
|
135
|
+
* was measured. A tier with fixed dimensions has no basis: its lengths are in the board unit.
|
|
136
|
+
*/
|
|
137
|
+
private _basis;
|
|
131
138
|
/** 고른 Tier 의 Anchor 면 위에서 본 자리 (Anchor 기준). 오른쪽이 +X, 위쪽이 −Z */
|
|
132
139
|
private _renderPicture;
|
|
133
140
|
/** 면 밖·겹침 경고. 고른 Tier 의 Anchor 면을 모른다는 것은 그림 아래에 이미 적었다 */
|
|
@@ -147,8 +154,11 @@ export declare class OxSlotLayoutEditor extends OxSlotLayoutEditor_base {
|
|
|
147
154
|
private _onDragEnd;
|
|
148
155
|
private _cancelDrag;
|
|
149
156
|
private _row;
|
|
157
|
+
/** A number field. With a basis, a length is shown and taken as a percentage of it, and kept in the board unit at that basis. */
|
|
150
158
|
private _num;
|
|
151
159
|
private _seg;
|
|
160
|
+
/** What the percentages of a tier with ratio dimensions are of: the face as it is now (the same ratio as at the face they were written at). */
|
|
161
|
+
private _basisHint;
|
|
152
162
|
private _renderTier;
|
|
153
163
|
/** 자리를 어떻게 늘어놓는가: 패턴, 수, 간격, 방향, 1번 자리. 그리고 [면에 맞춤] */
|
|
154
164
|
private _renderArrangement;
|
|
@@ -34,7 +34,7 @@ const SLOT = '#1976d2';
|
|
|
34
34
|
const FIELD_LABEL = {
|
|
35
35
|
anchor: ['face', 'Face'],
|
|
36
36
|
mount: ['mount', 'Mount'],
|
|
37
|
-
'follows-face': ['follows-face', '
|
|
37
|
+
'follows-face': ['follows-face', 'Dimensions'],
|
|
38
38
|
'position-x': ['position-x', 'Position X'],
|
|
39
39
|
'position-y': ['position-y', 'Position Y (height)'],
|
|
40
40
|
'position-z': ['position-z', 'Position Z'],
|
|
@@ -441,10 +441,36 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
441
441
|
return a.part === id ? face : `${id} · ${face}`;
|
|
442
442
|
return id;
|
|
443
443
|
}
|
|
444
|
-
_unit() {
|
|
444
|
+
_unit(basis) {
|
|
445
445
|
var _a;
|
|
446
|
+
if (basis)
|
|
447
|
+
return html ` <span class="unit">%</span>`;
|
|
446
448
|
return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.unit) ? html ` <span class="unit">${this.options.unit}</span>` : nothing;
|
|
447
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* What 100 % is for each length of a tier whose dimensions are a ratio of its face (ADR-0051 §4.3 decision 7): the face it
|
|
452
|
+
* was written at, the way `slotLayoutAtFaces` scales them. Position X·Z run along the anchor; pitches, offsets and slot
|
|
453
|
+
* sizes along the tier, which a quarter turn reads the other way round. Height is a ratio only when the room over the face
|
|
454
|
+
* was measured. A tier with fixed dimensions has no basis: its lengths are in the board unit.
|
|
455
|
+
*/
|
|
456
|
+
_basis(tier) {
|
|
457
|
+
const at = tier.followsFace;
|
|
458
|
+
if (!at)
|
|
459
|
+
return {};
|
|
460
|
+
const quarter = (deg) => Math.abs(Math.round((deg !== null && deg !== void 0 ? deg : 0) / 90)) % 2 === 1;
|
|
461
|
+
const turned = quarter(tier.rotation);
|
|
462
|
+
const x = turned ? at.depth : at.width;
|
|
463
|
+
const z = turned ? at.width : at.depth;
|
|
464
|
+
return {
|
|
465
|
+
positionX: at.width,
|
|
466
|
+
positionZ: at.depth,
|
|
467
|
+
height: at.height,
|
|
468
|
+
x,
|
|
469
|
+
z,
|
|
470
|
+
slotWidth: (rotation) => (quarter(rotation) ? z : x),
|
|
471
|
+
slotDepth: (rotation) => (quarter(rotation) ? x : z)
|
|
472
|
+
};
|
|
473
|
+
}
|
|
448
474
|
/** 고른 Tier 의 Anchor 면 위에서 본 자리 (Anchor 기준). 오른쪽이 +X, 위쪽이 −Z */
|
|
449
475
|
_renderPicture(draft, tierNo) {
|
|
450
476
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -622,16 +648,18 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
622
648
|
${control} ${messages ? html `<div class="err" data-error=${field}>${messages.join(' · ')}</div>` : nothing}
|
|
623
649
|
`;
|
|
624
650
|
}
|
|
651
|
+
/** A number field. With a basis, a length is shown and taken as a percentage of it, and kept in the board unit at that basis. */
|
|
625
652
|
_num(field, value, onChange, errors, extra = {}) {
|
|
626
653
|
var _a, _b;
|
|
654
|
+
const basis = extra.basis;
|
|
627
655
|
return html `<input
|
|
628
656
|
type="number"
|
|
629
657
|
data-field=${field}
|
|
630
658
|
?invalid=${errors.has(field)}
|
|
631
659
|
min=${(_a = extra.min) !== null && _a !== void 0 ? _a : nothing}
|
|
632
660
|
step=${(_b = extra.step) !== null && _b !== void 0 ? _b : nothing}
|
|
633
|
-
.value=${shown(value)}
|
|
634
|
-
@change=${(e) => onChange(num(e))}
|
|
661
|
+
.value=${live(shown(basis && typeof value === 'number' ? (value / basis) * 100 : value))}
|
|
662
|
+
@change=${(e) => onChange(basis ? (num(e) * basis) / 100 : num(e))}
|
|
635
663
|
/>`;
|
|
636
664
|
}
|
|
637
665
|
_seg(field, value, options, onChange, errors) {
|
|
@@ -641,8 +669,18 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
641
669
|
</button>`)}
|
|
642
670
|
</div>`;
|
|
643
671
|
}
|
|
672
|
+
/** What the percentages of a tier with ratio dimensions are of: the face as it is now (the same ratio as at the face they were written at). */
|
|
673
|
+
_basisHint(at) {
|
|
674
|
+
var _a, _b;
|
|
675
|
+
const unit = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.unit) !== null && _b !== void 0 ? _b : 'mm';
|
|
676
|
+
const face = t('follows-face-basis', 'The face ({width} × {depth} {unit}) is 100 %.', { width: shown(at.width), depth: shown(at.depth), unit });
|
|
677
|
+
const height = at.height
|
|
678
|
+
? t('follows-face-basis-height', 'Heights: the room over the face ({height} {unit}) is 100 %.', { height: shown(at.height), unit })
|
|
679
|
+
: t('follows-face-basis-no-height', 'Heights stay in {unit}.', { unit });
|
|
680
|
+
return html `<label class="l"></label><div class="hint" data-basis>${face} ${height}</div>`;
|
|
681
|
+
}
|
|
644
682
|
_renderTier(draft, tierNo, errors) {
|
|
645
|
-
var _a, _b, _c, _d, _e, _f;
|
|
683
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
646
684
|
const tier = draft.tiers.find(x => x.tierNo === tierNo);
|
|
647
685
|
const anchors = (_a = this.options) === null || _a === void 0 ? void 0 : _a.anchors;
|
|
648
686
|
/* A tier that follows its face, moved to another face, follows that one: its numbers are read as at the face it stands on. */
|
|
@@ -653,7 +691,7 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
653
691
|
};
|
|
654
692
|
const position = (_b = tier.position) !== null && _b !== void 0 ? _b : { x: 0, y: 0, z: 0 };
|
|
655
693
|
const fine = ['position-x', 'position-y', 'position-z', 'tier-rotation'].some(f => errors.has(f));
|
|
656
|
-
const
|
|
694
|
+
const b = this._basis(tier);
|
|
657
695
|
return html `
|
|
658
696
|
<section data-section="where">
|
|
659
697
|
<h4>${t('where', 'Where')}</h4>
|
|
@@ -669,19 +707,20 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
669
707
|
['HANG', t('mount.HANG', 'Hang')]
|
|
670
708
|
], mount => editTier({ mount }), errors), errors)}
|
|
671
709
|
${this._faceAt(tier.anchorId)
|
|
672
|
-
? this._row('follows-face', t('follows-face', '
|
|
673
|
-
['FOLLOW', t('follows-face.FOLLOW', '
|
|
674
|
-
['KEEP', t('follows-face.KEEP', '
|
|
675
|
-
], v => this._edit(setTierFollowsFace(draft, tierNo, v === 'FOLLOW' ? this._faceAt(tier.anchorId) : undefined)), errors), errors)
|
|
710
|
+
? html `${this._row('follows-face', t('follows-face', 'Dimensions'), this._seg('follows-face', tier.followsFace ? 'FOLLOW' : 'KEEP', [
|
|
711
|
+
['FOLLOW', t('follows-face.FOLLOW', 'Ratio (%)')],
|
|
712
|
+
['KEEP', t('follows-face.KEEP', 'Fixed ({unit})', { unit: (_h = (_g = this.options) === null || _g === void 0 ? void 0 : _g.unit) !== null && _h !== void 0 ? _h : 'mm' })]
|
|
713
|
+
], v => this._edit(setTierFollowsFace(draft, tierNo, v === 'FOLLOW' ? this._faceAt(tier.anchorId) : undefined)), errors), errors)}
|
|
714
|
+
${tier.followsFace ? this._basisHint({ ...tier.followsFace, ...this._faceAt(tier.anchorId) }) : nothing}`
|
|
676
715
|
: nothing}
|
|
677
716
|
</section>
|
|
678
717
|
${this._renderArrangement(draft, tierNo, errors)} ${this._renderSlot(draft, tierNo, errors)}
|
|
679
718
|
<details data-section="fine" ?open=${fine}>
|
|
680
719
|
<summary>${t('fine', 'Position and rotation')}</summary>
|
|
681
720
|
<section>
|
|
682
|
-
${this._row('position-x', html `${t('position-x', 'Position X')}${
|
|
683
|
-
${this._row('position-y', html `${t('position-y', 'Position Y (height)')}${
|
|
684
|
-
${this._row('position-z', html `${t('position-z', 'Position Z')}${
|
|
721
|
+
${this._row('position-x', html `${t('position-x', 'Position X')}${this._unit(b.positionX)}`, this._num('position-x', position.x, n => editTier({ position: { ...position, x: n } }), errors, { basis: b.positionX }), errors)}
|
|
722
|
+
${this._row('position-y', html `${t('position-y', 'Position Y (height)')}${this._unit(b.height)}`, this._num('position-y', position.y, n => editTier({ position: { ...position, y: n } }), errors, { basis: b.height }), errors)}
|
|
723
|
+
${this._row('position-z', html `${t('position-z', 'Position Z')}${this._unit(b.positionZ)}`, this._num('position-z', position.z, n => editTier({ position: { ...position, z: n } }), errors, { basis: b.positionZ }), errors)}
|
|
685
724
|
${this._row('tier-rotation', t('tier-rotation', 'Tier rotation (deg)'), this._num('tier-rotation', tier.rotation, n => editTier({ rotation: n }), errors), errors)}
|
|
686
725
|
</section>
|
|
687
726
|
</details>
|
|
@@ -693,7 +732,8 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
693
732
|
const tier = draft.tiers.find(x => x.tierNo === tierNo);
|
|
694
733
|
const l = tier.layout;
|
|
695
734
|
const edit = (patch) => this._edit(updatePattern(draft, tierNo, patch));
|
|
696
|
-
const
|
|
735
|
+
const b = this._basis(tier);
|
|
736
|
+
const rowBasis = l.pattern === 'ROW' ? (l.axis === 'Z' ? b.z : b.x) : undefined;
|
|
697
737
|
const side = (axis) => axis === 'X'
|
|
698
738
|
? [
|
|
699
739
|
['MIN', t('side.left', 'Left')],
|
|
@@ -726,7 +766,7 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
726
766
|
${l.pattern === 'ROW'
|
|
727
767
|
? html `
|
|
728
768
|
${this._row('count', t('count', 'Slots'), this._num('count', l.count, n => edit({ count: n }), errors, { min: '1', step: '1' }), errors)}
|
|
729
|
-
${this._row('pitch', html `${t('pitch', 'Pitch')}${
|
|
769
|
+
${this._row('pitch', html `${t('pitch', 'Pitch')}${this._unit(rowBasis)}`, html `<div class="inline">${this._num('pitch', l.pitch, n => edit({ pitch: n }), errors, { basis: rowBasis })} ${fitButton}</div>`, errors)}
|
|
730
770
|
${this._row('axis', t('axis', 'Direction'), this._seg('axis', l.axis, [
|
|
731
771
|
['X', t('axis.X', 'Across (X)')],
|
|
732
772
|
['Z', t('axis.Z', 'Down (Z)')]
|
|
@@ -738,8 +778,8 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
738
778
|
? html `
|
|
739
779
|
${this._row('rows', t('rows', 'Rows (Z)'), this._num('rows', l.rows, n => edit({ rows: n }), errors, { min: '1', step: '1' }), errors)}
|
|
740
780
|
${this._row('cols', t('cols', 'Columns (X)'), this._num('cols', l.cols, n => edit({ cols: n }), errors, { min: '1', step: '1' }), errors)}
|
|
741
|
-
${this._row('pitch-x', html `${t('pitch-x', 'Pitch X')}${
|
|
742
|
-
${this._row('pitch-z', html `${t('pitch-z', 'Pitch Z')}${
|
|
781
|
+
${this._row('pitch-x', html `${t('pitch-x', 'Pitch X')}${this._unit(b.x)}`, this._num('pitch-x', (_b = l.pitch) === null || _b === void 0 ? void 0 : _b.x, n => edit({ pitch: { ...l.pitch, x: n } }), errors, { basis: b.x }), errors)}
|
|
782
|
+
${this._row('pitch-z', html `${t('pitch-z', 'Pitch Z')}${this._unit(b.z)}`, html `<div class="inline">${this._num('pitch-z', (_c = l.pitch) === null || _c === void 0 ? void 0 : _c.z, n => edit({ pitch: { ...l.pitch, z: n } }), errors, { basis: b.z })} ${fitButton}</div>`, errors)}
|
|
743
783
|
${this._row('order', t('order', 'Numbering'), html `<select data-field="order" .value=${live((_d = l.order) !== null && _d !== void 0 ? _d : 'ROW_MAJOR')} @change=${(e) => edit({ order: e.target.value })}>
|
|
744
784
|
${['ROW_MAJOR', 'COL_MAJOR', 'SERPENTINE_ROW', 'SERPENTINE_COL'].map(o => { var _a; return html `<option value=${o} ?selected=${o === ((_a = l.order) !== null && _a !== void 0 ? _a : 'ROW_MAJOR')}>${t(`order.${o}`, o)}</option>`; })}
|
|
745
785
|
</select>`, errors)}
|
|
@@ -806,22 +846,23 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
806
846
|
}
|
|
807
847
|
/** 자리 하나의 크기·받는 것·쌓기 (이 Tier 의 모든 자리 공통). CUSTOM 은 자리 표에서 */
|
|
808
848
|
_renderSlot(draft, tierNo, errors) {
|
|
809
|
-
var _a, _b, _c;
|
|
849
|
+
var _a, _b, _c, _d, _e;
|
|
810
850
|
const tier = draft.tiers.find(x => x.tierNo === tierNo);
|
|
811
851
|
if (tier.layout.pattern === 'CUSTOM')
|
|
812
852
|
return nothing;
|
|
813
853
|
const spec = tier.layout.slot;
|
|
814
854
|
const edit = (patch) => this._edit(updateSlotSpec(draft, tierNo, patch));
|
|
815
|
-
const
|
|
816
|
-
const
|
|
855
|
+
const b = this._basis(tier);
|
|
856
|
+
const bases = { width: (_a = b.slotWidth) === null || _a === void 0 ? void 0 : _a.call(b, spec.rotation), depth: (_b = b.slotDepth) === null || _b === void 0 ? void 0 : _b.call(b, spec.rotation), height: b.height };
|
|
857
|
+
const allowed = (k, field, label) => { var _a; return this._row(field, html `${label}${this._unit(bases[k])}`, this._num(field, (_a = spec.allowed) === null || _a === void 0 ? void 0 : _a[k], n => edit({ allowed: { ...spec.allowed, [k]: n } }), errors, { basis: bases[k] }), errors); };
|
|
817
858
|
return html `
|
|
818
859
|
<section data-section="slot">
|
|
819
860
|
<h4>${t('slot-spec', 'Each slot')}</h4>
|
|
820
861
|
${this._acceptsEditor(spec, accepts => edit({ accepts }), errors)} ${allowed('width', 'allowed-width', t('allowed-width', 'Width (X)'))}
|
|
821
862
|
${allowed('depth', 'allowed-depth', t('allowed-depth', 'Depth (Z)'))} ${allowed('height', 'allowed-height', t('allowed-height', 'Height'))}
|
|
822
|
-
${((
|
|
823
|
-
${this._row('stack-limit', t('stack-limit', 'Stack limit'), this._num('stack-limit', (
|
|
824
|
-
${this._row('rotation', t('rotation', 'Slot rotation (deg)'), this._num('rotation', (
|
|
863
|
+
${((_c = this.options) === null || _c === void 0 ? void 0 : _c.itemTypes) ? html `<div class="hint">${t('drawn-at-slot', 'An item that gives no size is drawn at this size.')}</div>` : nothing}
|
|
864
|
+
${this._row('stack-limit', t('stack-limit', 'Stack limit'), this._num('stack-limit', (_d = spec.stackLimit) !== null && _d !== void 0 ? _d : 1, n => edit({ stackLimit: n }), errors, { min: '1', step: '1' }), errors)}
|
|
865
|
+
${this._row('rotation', t('rotation', 'Slot rotation (deg)'), this._num('rotation', (_e = spec.rotation) !== null && _e !== void 0 ? _e : 0, n => edit({ rotation: n || undefined }), errors), errors)}
|
|
825
866
|
</section>
|
|
826
867
|
`;
|
|
827
868
|
}
|
|
@@ -829,32 +870,40 @@ let OxSlotLayoutEditor = class OxSlotLayoutEditor extends localize(i18next)(LitE
|
|
|
829
870
|
var _a, _b, _c;
|
|
830
871
|
const tier = draft.tiers.find(x => x.tierNo === tierNo);
|
|
831
872
|
const slots = [...tier.layout.slots].sort((a, b) => a.slotNo - b.slotNo);
|
|
832
|
-
const
|
|
873
|
+
const b = this._basis(tier);
|
|
874
|
+
/* A length cell: with a basis, a percentage of it (see _num). */
|
|
875
|
+
const cell = (slotNo, value, patch, basis) => html `<td>
|
|
876
|
+
<input
|
|
877
|
+
type="number"
|
|
878
|
+
.value=${live(shown(basis && typeof value === 'number' ? (value / basis) * 100 : value))}
|
|
879
|
+
@change=${(e) => this._edit(updateSlotSpec(draft, tierNo, patch(basis ? (num(e) * basis) / 100 : num(e)), slotNo))}
|
|
880
|
+
/>
|
|
881
|
+
</td>`;
|
|
833
882
|
return html `
|
|
834
883
|
<h4>${t('custom-slots', 'Slots')}</h4>
|
|
835
884
|
<table>
|
|
836
885
|
<tr>
|
|
837
886
|
<th>#</th>
|
|
838
|
-
<th>X</th>
|
|
839
|
-
<th>Z</th>
|
|
840
|
-
<th>${t('w', 'W')}</th>
|
|
841
|
-
<th>${t('d', 'D')}</th>
|
|
842
|
-
<th>${t('h', 'H')}</th>
|
|
887
|
+
<th>X${this._unit(b.x)}</th>
|
|
888
|
+
<th>Z${this._unit(b.z)}</th>
|
|
889
|
+
<th>${t('w', 'W')}${this._unit(b.x)}</th>
|
|
890
|
+
<th>${t('d', 'D')}${this._unit(b.z)}</th>
|
|
891
|
+
<th>${t('h', 'H')}${this._unit(b.height)}</th>
|
|
843
892
|
<th>${t('stack', 'Stack')}</th>
|
|
844
893
|
<th>${t('rot', 'Rot')}</th>
|
|
845
894
|
<th></th>
|
|
846
895
|
</tr>
|
|
847
896
|
${slots.map(s => {
|
|
848
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
897
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
849
898
|
return html `
|
|
850
899
|
<tr>
|
|
851
900
|
<td>${s.slotNo}</td>
|
|
852
|
-
${cell(s.slotNo, (_a = s.offset) === null || _a === void 0 ? void 0 : _a.x,
|
|
853
|
-
${cell(s.slotNo, (_b = s.offset) === null || _b === void 0 ? void 0 : _b.z,
|
|
854
|
-
${cell(s.slotNo, (_c = s.allowed) === null || _c === void 0 ? void 0 : _c.width,
|
|
855
|
-
${cell(s.slotNo, (
|
|
856
|
-
${cell(s.slotNo, (
|
|
857
|
-
${cell(s.slotNo, (
|
|
901
|
+
${cell(s.slotNo, (_a = s.offset) === null || _a === void 0 ? void 0 : _a.x, n => ({ offset: { ...s.offset, x: n } }), b.x)}
|
|
902
|
+
${cell(s.slotNo, (_b = s.offset) === null || _b === void 0 ? void 0 : _b.z, n => ({ offset: { ...s.offset, z: n } }), b.z)}
|
|
903
|
+
${cell(s.slotNo, (_c = s.allowed) === null || _c === void 0 ? void 0 : _c.width, n => ({ allowed: { ...s.allowed, width: n } }), (_d = b.slotWidth) === null || _d === void 0 ? void 0 : _d.call(b, s.rotation))}
|
|
904
|
+
${cell(s.slotNo, (_e = s.allowed) === null || _e === void 0 ? void 0 : _e.depth, n => ({ allowed: { ...s.allowed, depth: n } }), (_f = b.slotDepth) === null || _f === void 0 ? void 0 : _f.call(b, s.rotation))}
|
|
905
|
+
${cell(s.slotNo, (_g = s.allowed) === null || _g === void 0 ? void 0 : _g.height, n => ({ allowed: { ...s.allowed, height: n } }), b.height)}
|
|
906
|
+
${cell(s.slotNo, (_h = s.stackLimit) !== null && _h !== void 0 ? _h : 1, n => ({ stackLimit: n }))} ${cell(s.slotNo, (_j = s.rotation) !== null && _j !== void 0 ? _j : 0, n => ({ rotation: n || undefined }))}
|
|
858
907
|
<td><button ?disabled=${slots.length <= 1} @click=${() => this._edit(removeCustomSlot(draft, tierNo, s.slotNo))}>−</button></td>
|
|
859
908
|
</tr>
|
|
860
909
|
`;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/slot-layout-editor",
|
|
3
3
|
"description": "Editor for a holder's tiers and slots (things-scene slot layout): edit, validate, preview",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "10.29.
|
|
5
|
+
"version": "10.29.90",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@operato/i18n": "^10.29.85",
|
|
49
|
-
"@operato/property-editor": "^10.29.
|
|
49
|
+
"@operato/property-editor": "^10.29.90",
|
|
50
50
|
"lit": "^3.1.2"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@hatiolab/things-scene": "^10.1.
|
|
53
|
+
"@hatiolab/things-scene": "^10.1.123"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
57
|
-
"@hatiolab/things-scene": "^10.1.
|
|
57
|
+
"@hatiolab/things-scene": "^10.1.123",
|
|
58
58
|
"@open-wc/testing": "^4.0.0",
|
|
59
59
|
"@web/dev-server": "^0.4.0",
|
|
60
60
|
"@web/test-runner": "^0.19.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"typescript": "^5.0.4"
|
|
67
67
|
},
|
|
68
68
|
"prettier": "@hatiolab/prettier-config",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "354953417c0c6fefa2ed68da4fcfd276d95ba605"
|
|
70
70
|
}
|
package/translations/en.json
CHANGED
|
@@ -129,8 +129,11 @@
|
|
|
129
129
|
"label.slot-layout.w": "W",
|
|
130
130
|
"label.slot-layout.where": "Where",
|
|
131
131
|
"label.slot-layout.width": "Width (X)",
|
|
132
|
-
"label.slot-layout.follows-face": "
|
|
133
|
-
"label.slot-layout.follows-face.FOLLOW": "
|
|
134
|
-
"label.slot-layout.follows-face.KEEP": "
|
|
135
|
-
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "A tier
|
|
132
|
+
"label.slot-layout.follows-face": "Dimensions",
|
|
133
|
+
"label.slot-layout.follows-face.FOLLOW": "Ratio (%)",
|
|
134
|
+
"label.slot-layout.follows-face.KEEP": "Fixed ({unit})",
|
|
135
|
+
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "A tier whose dimensions are a ratio (%) turns by 90° steps only",
|
|
136
|
+
"label.slot-layout.follows-face-basis": "The face ({width} × {depth} {unit}) is 100 %.",
|
|
137
|
+
"label.slot-layout.follows-face-basis-height": "Heights: the room over the face ({height} {unit}) is 100 %.",
|
|
138
|
+
"label.slot-layout.follows-face-basis-no-height": "Heights stay in {unit}."
|
|
136
139
|
}
|
package/translations/es.json
CHANGED
|
@@ -129,8 +129,11 @@
|
|
|
129
129
|
"label.slot-layout.w": "An",
|
|
130
130
|
"label.slot-layout.where": "Dónde",
|
|
131
131
|
"label.slot-layout.width": "Anchura (X)",
|
|
132
|
-
"label.slot-layout.follows-face": "
|
|
133
|
-
"label.slot-layout.follows-face.FOLLOW": "
|
|
134
|
-
"label.slot-layout.follows-face.KEEP": "
|
|
135
|
-
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "Un nivel
|
|
132
|
+
"label.slot-layout.follows-face": "Dimensiones",
|
|
133
|
+
"label.slot-layout.follows-face.FOLLOW": "Proporción (%)",
|
|
134
|
+
"label.slot-layout.follows-face.KEEP": "Fijo ({unit})",
|
|
135
|
+
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "Un nivel con dimensiones en proporción (%) solo gira en pasos de 90°",
|
|
136
|
+
"label.slot-layout.follows-face-basis": "La cara ({width} × {depth} {unit}) es el 100 %.",
|
|
137
|
+
"label.slot-layout.follows-face-basis-height": "Alturas: el espacio sobre la cara ({height} {unit}) es el 100 %.",
|
|
138
|
+
"label.slot-layout.follows-face-basis-no-height": "Las alturas siguen en {unit}."
|
|
136
139
|
}
|
package/translations/ja.json
CHANGED
|
@@ -129,8 +129,11 @@
|
|
|
129
129
|
"label.slot-layout.w": "W",
|
|
130
130
|
"label.slot-layout.where": "置く場所",
|
|
131
131
|
"label.slot-layout.width": "Width (X)",
|
|
132
|
-
"label.slot-layout.follows-face": "
|
|
133
|
-
"label.slot-layout.follows-face.FOLLOW": "
|
|
134
|
-
"label.slot-layout.follows-face.KEEP": "
|
|
135
|
-
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "
|
|
132
|
+
"label.slot-layout.follows-face": "寸法",
|
|
133
|
+
"label.slot-layout.follows-face.FOLLOW": "比率(%)",
|
|
134
|
+
"label.slot-layout.follows-face.KEEP": "固定({unit})",
|
|
135
|
+
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "寸法が比率(%)の段は 90° 単位でのみ回転できます",
|
|
136
|
+
"label.slot-layout.follows-face-basis": "面({width} × {depth} {unit})を 100 % とします。",
|
|
137
|
+
"label.slot-layout.follows-face-basis-height": "高さは面の上の空間({height} {unit})を 100 % とします。",
|
|
138
|
+
"label.slot-layout.follows-face-basis-no-height": "高さは {unit} のままです。"
|
|
136
139
|
}
|
package/translations/ko.json
CHANGED
|
@@ -129,8 +129,11 @@
|
|
|
129
129
|
"label.slot-layout.w": "폭",
|
|
130
130
|
"label.slot-layout.where": "놓을 곳",
|
|
131
131
|
"label.slot-layout.width": "폭 (X)",
|
|
132
|
-
"label.slot-layout.follows-face": "
|
|
133
|
-
"label.slot-layout.follows-face.FOLLOW": "
|
|
134
|
-
"label.slot-layout.follows-face.KEEP": "
|
|
135
|
-
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "
|
|
132
|
+
"label.slot-layout.follows-face": "치수",
|
|
133
|
+
"label.slot-layout.follows-face.FOLLOW": "비율(%)",
|
|
134
|
+
"label.slot-layout.follows-face.KEEP": "고정({unit})",
|
|
135
|
+
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "치수가 비율(%)인 층은 90° 단위로만 돌릴 수 있습니다",
|
|
136
|
+
"label.slot-layout.follows-face-basis": "면({width} × {depth} {unit})을 100 %로 봅니다.",
|
|
137
|
+
"label.slot-layout.follows-face-basis-height": "높이는 면 위 공간({height} {unit})을 100 %로 봅니다.",
|
|
138
|
+
"label.slot-layout.follows-face-basis-no-height": "높이는 {unit} 그대로입니다."
|
|
136
139
|
}
|
package/translations/ms.json
CHANGED
|
@@ -129,8 +129,11 @@
|
|
|
129
129
|
"label.slot-layout.w": "W",
|
|
130
130
|
"label.slot-layout.where": "Di mana",
|
|
131
131
|
"label.slot-layout.width": "Width (X)",
|
|
132
|
-
"label.slot-layout.follows-face": "
|
|
133
|
-
"label.slot-layout.follows-face.FOLLOW": "
|
|
134
|
-
"label.slot-layout.follows-face.KEEP": "
|
|
135
|
-
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "Tingkat yang
|
|
132
|
+
"label.slot-layout.follows-face": "Dimensi",
|
|
133
|
+
"label.slot-layout.follows-face.FOLLOW": "Nisbah (%)",
|
|
134
|
+
"label.slot-layout.follows-face.KEEP": "Tetap ({unit})",
|
|
135
|
+
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "Tingkat yang dimensinya nisbah (%) berpusing dalam langkah 90° sahaja",
|
|
136
|
+
"label.slot-layout.follows-face-basis": "Muka ({width} × {depth} {unit}) ialah 100 %.",
|
|
137
|
+
"label.slot-layout.follows-face-basis-height": "Ketinggian: ruang di atas muka ({height} {unit}) ialah 100 %.",
|
|
138
|
+
"label.slot-layout.follows-face-basis-no-height": "Ketinggian kekal dalam {unit}."
|
|
136
139
|
}
|
package/translations/zh.json
CHANGED
|
@@ -129,8 +129,11 @@
|
|
|
129
129
|
"label.slot-layout.w": "W",
|
|
130
130
|
"label.slot-layout.where": "放置处",
|
|
131
131
|
"label.slot-layout.width": "Width (X)",
|
|
132
|
-
"label.slot-layout.follows-face": "
|
|
133
|
-
"label.slot-layout.follows-face.FOLLOW": "
|
|
134
|
-
"label.slot-layout.follows-face.KEEP": "
|
|
135
|
-
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "
|
|
132
|
+
"label.slot-layout.follows-face": "尺寸",
|
|
133
|
+
"label.slot-layout.follows-face.FOLLOW": "比例(%)",
|
|
134
|
+
"label.slot-layout.follows-face.KEEP": "固定({unit})",
|
|
135
|
+
"label.slot-layout.issue.FOLLOWS_FACE_TURN": "尺寸为比例(%)的层只能以 90° 为单位旋转",
|
|
136
|
+
"label.slot-layout.follows-face-basis": "以面({width} × {depth} {unit})为 100 %。",
|
|
137
|
+
"label.slot-layout.follows-face-basis-height": "高度以面上空间({height} {unit})为 100 %。",
|
|
138
|
+
"label.slot-layout.follows-face-basis-no-height": "高度仍以 {unit} 计。"
|
|
136
139
|
}
|