@simplysm/angular 14.0.48 → 14.0.49
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/README.md +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/styles.css +9 -0
- package/docs/features.md +0 -15
- package/docs/recipes/crud-detail.md +379 -364
- package/docs/recipes/crud-list.md +728 -470
- package/docs/recipes/data-select-button.md +12 -13
- package/docs/ui-navigation.md +30 -0
- package/package.json +7 -7
- package/scss/commons/_styles.scss +12 -0
- package/src/index.ts +0 -3
- package/dist/data/getOrmDataEditToastErrorMessage.d.ts +0 -2
- package/dist/data/getOrmDataEditToastErrorMessage.d.ts.map +0 -1
- package/dist/data/getOrmDataEditToastErrorMessage.js +0 -8
- package/src/data/getOrmDataEditToastErrorMessage.ts +0 -10
|
@@ -254,18 +254,17 @@ export class LotSelectButton {
|
|
|
254
254
|
this._selectedItems.set([]);
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
void this._loadAsync([v]);
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
257
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
258
|
+
void (async () => {
|
|
259
|
+
const items = await this._appOrm.connectAsync(async (db) =>
|
|
260
|
+
db.lot()
|
|
261
|
+
.where((it) => [expr.in(it.id, [v])])
|
|
262
|
+
.select((it) => ({ id: it.id, code: it.code }))
|
|
263
|
+
.execute(),
|
|
264
|
+
);
|
|
265
|
+
this._selectedItems.set(items);
|
|
266
|
+
})();
|
|
267
|
+
});
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
270
|
```
|
|
@@ -283,8 +282,8 @@ export class LotSelectButton {
|
|
|
283
282
|
**핵심:**
|
|
284
283
|
- `<sd-modal-select-button>`이 모달 호출/erase/invalid 로직 담당 → wrapper는 비동기 load만 추가
|
|
285
284
|
- `_selectedItems`는 내부 signal. 외부에서는 `value`만 set
|
|
286
|
-
-
|
|
287
|
-
- multi 모드를 지원하려면 `value = model<number[] | undefined>()`로 변경 + `selectMode = input<"single"|"multi">("single")` 추가 + effect
|
|
285
|
+
- effect 콜백은 동기여야 하므로 비동기 작업은 `void (async () => { ... })()` IIFE로 감싼다. 로드 함수가 한 곳에서만 호출되므로 별도 private 메서드로 분리하지 않고 effect 내부에 직접 인라인한다
|
|
286
|
+
- multi 모드를 지원하려면 `value = model<number[] | undefined>()`로 변경 + `selectMode = input<"single"|"multi">("single")` 추가 + effect의 `expr.in(it.id, [v])`를 배열 전체로 바꾸고 배열 길이 분기 추가
|
|
288
287
|
|
|
289
288
|
### 5.1 시트 셀 안에 삽입
|
|
290
289
|
|
package/docs/ui-navigation.md
CHANGED
|
@@ -180,6 +180,36 @@ interface SdSidebarUserMenu {
|
|
|
180
180
|
|
|
181
181
|
## Topbar
|
|
182
182
|
|
|
183
|
+
### 기본 사용 예제
|
|
184
|
+
|
|
185
|
+
topbar만 있는 단순 페이지(홈·메인 등) 스캐폴드. 본문 영역이 비어 있으면 topbar 아래에 별도 컨테이너 div를 두지 않는다.
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from "@angular/core";
|
|
189
|
+
import { injectViewTitleSignal, SdTopbar, SdTopbarContainer } from "@simplysm/angular";
|
|
190
|
+
|
|
191
|
+
@Component({
|
|
192
|
+
selector: "app-main",
|
|
193
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
194
|
+
encapsulation: ViewEncapsulation.None,
|
|
195
|
+
standalone: true,
|
|
196
|
+
imports: [SdTopbarContainer, SdTopbar],
|
|
197
|
+
template: `
|
|
198
|
+
<sd-topbar-container>
|
|
199
|
+
<sd-topbar>
|
|
200
|
+
<h4>{{ viewTitle() }}</h4>
|
|
201
|
+
</sd-topbar>
|
|
202
|
+
</sd-topbar-container>
|
|
203
|
+
`,
|
|
204
|
+
})
|
|
205
|
+
export class MainPage {
|
|
206
|
+
viewTitle = injectViewTitleSignal();
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
- 제목은 [`injectViewTitleSignal`](./utils.md#injectviewtitlesignal)이 `SdAppStructureProvider`에서 자동 조회한다.
|
|
211
|
+
- 페이지/모달/control 뷰에서 **재사용**되는 화면은 뷰 분기가 필요하므로 [`recipes/page-modal-container.md`](./recipes/page-modal-container.md)를 사용한다.
|
|
212
|
+
|
|
183
213
|
### `SdTopbarContainer`
|
|
184
214
|
|
|
185
215
|
탑바 컨테이너.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/angular",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.49",
|
|
4
4
|
"description": "심플리즘 패키지 - Angular",
|
|
5
5
|
"author": "심플리즘",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@angular/platform-browser": "^21.2.9",
|
|
32
32
|
"@angular/router": "^21.2.9",
|
|
33
33
|
"@angular/service-worker": "^21.2.9",
|
|
34
|
-
"@ng-icons/core": "^33.2.
|
|
35
|
-
"@ng-icons/tabler-icons": "^33.2.
|
|
34
|
+
"@ng-icons/core": "^33.2.2",
|
|
35
|
+
"@ng-icons/tabler-icons": "^33.2.2",
|
|
36
36
|
"@tiptap/core": "^3.22.4",
|
|
37
37
|
"@tiptap/extension-color": "^3.22.4",
|
|
38
38
|
"@tiptap/extension-document": "^3.22.4",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"jspdf": "^4.2.1",
|
|
52
52
|
"rxjs": "^7.8.2",
|
|
53
53
|
"tabbable": "^6.4.0",
|
|
54
|
-
"@simplysm/core-browser": "14.0.
|
|
55
|
-
"@simplysm/core-common": "14.0.
|
|
56
|
-
"@simplysm/service-client": "14.0.
|
|
57
|
-
"@simplysm/service-common": "14.0.
|
|
54
|
+
"@simplysm/core-browser": "14.0.49",
|
|
55
|
+
"@simplysm/core-common": "14.0.49",
|
|
56
|
+
"@simplysm/service-client": "14.0.49",
|
|
57
|
+
"@simplysm/service-common": "14.0.49"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@angular/compiler": "^21.2.9",
|
|
@@ -111,6 +111,18 @@
|
|
|
111
111
|
} // @layer base
|
|
112
112
|
|
|
113
113
|
@layer utilities {
|
|
114
|
+
.block {
|
|
115
|
+
display: block;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.inline-block {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.inline {
|
|
123
|
+
display: inline;
|
|
124
|
+
}
|
|
125
|
+
|
|
114
126
|
//-- FONT SIZE
|
|
115
127
|
|
|
116
128
|
@each $h in (h1, h2, h3, h4, h5, h6) {
|
package/src/index.ts
CHANGED
|
@@ -226,9 +226,6 @@ export type {
|
|
|
226
226
|
SdSheetCellKeydownEventParam,
|
|
227
227
|
} from "./data/sheet/types";
|
|
228
228
|
|
|
229
|
-
// data/utils
|
|
230
|
-
export { getOrmDataEditToastErrorMessage } from "./data/getOrmDataEditToastErrorMessage";
|
|
231
|
-
|
|
232
229
|
// data/shared-data
|
|
233
230
|
export { SdSharedDataSelect } from "./data/shared-data/sd-shared-data-select";
|
|
234
231
|
export { SdSharedDataSelectButton } from "./data/shared-data/sd-shared-data-select-button";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOrmDataEditToastErrorMessage.d.ts","sourceRoot":"","sources":["../../src/data/getOrmDataEditToastErrorMessage.ts"],"names":[],"mappings":"AAAA,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CASpE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export function getOrmDataEditToastErrorMessage(err) {
|
|
2
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
3
|
-
if (message.includes("a parent row: a foreign key constraint") ||
|
|
4
|
-
message.includes("conflicted with the REFERENCE")) {
|
|
5
|
-
return "경고! 연결된 작업에 의한 처리 거부. 후속작업 확인 요망";
|
|
6
|
-
}
|
|
7
|
-
return message;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function getOrmDataEditToastErrorMessage(err: unknown): string {
|
|
2
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
3
|
-
if (
|
|
4
|
-
message.includes("a parent row: a foreign key constraint") ||
|
|
5
|
-
message.includes("conflicted with the REFERENCE")
|
|
6
|
-
) {
|
|
7
|
-
return "경고! 연결된 작업에 의한 처리 거부. 후속작업 확인 요망";
|
|
8
|
-
}
|
|
9
|
-
return message;
|
|
10
|
-
}
|