sonamu 0.15.0 → 0.15.1
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/template/implementations/services.template.d.ts.map +1 -1
- package/dist/template/implementations/services.template.js +4 -6
- package/dist/ui-web/assets/{index-CdZtV4yt.js → index-WNemA9iY.js} +1 -1
- package/dist/ui-web/index.html +1 -1
- package/package.json +1 -1
- package/src/template/implementations/services.template.ts +5 -7
package/dist/ui-web/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<meta name="sonamu-ui-token" content="{{sonamuUIToken}}" />
|
|
8
8
|
<title>{{projectName}}: Sonamu UI</title>
|
|
9
|
-
<script type="module" crossorigin src="/sonamu-ui/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/sonamu-ui/assets/index-WNemA9iY.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/sonamu-ui/assets/index-DbecN7yE.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/package.json
CHANGED
|
@@ -289,7 +289,7 @@ export const use${inflection.camelize(hookName)} = ${typeParamsDef}(${paramsDef}
|
|
|
289
289
|
`.trim(),
|
|
290
290
|
);
|
|
291
291
|
|
|
292
|
-
// infiniteQueryOptions + useInfiniteQuery (AsyncIdConfig.
|
|
292
|
+
// infiniteQueryOptions + useInfiniteQuery (AsyncIdConfig.listInfiniteQueryOptions 대상 조건)
|
|
293
293
|
// 조건: resourceName이 복수형이고 methodName === "findMany"
|
|
294
294
|
const resourceName = api.options.resourceName;
|
|
295
295
|
const isInfiniteTarget =
|
|
@@ -425,10 +425,8 @@ ${functions.join("\n\n")}
|
|
|
425
425
|
});
|
|
426
426
|
|
|
427
427
|
if (listApi) {
|
|
428
|
-
//
|
|
429
|
-
const
|
|
430
|
-
const useHookName = `use${inflection.camelize(hookName)}`;
|
|
431
|
-
const useHookInfiniteName = `${useHookName}Infinite`;
|
|
428
|
+
// 위 1.에서 만든 함수 이름(get + resourceName)과 같아야 함
|
|
429
|
+
const methodName = `get${inflection.camelize(assertDefined(listApi.options.resourceName))}`;
|
|
432
430
|
|
|
433
431
|
// ListParams 타입명 구성
|
|
434
432
|
const listParamsType = `${names.capital}ListParams`;
|
|
@@ -438,8 +436,8 @@ ${functions.join("\n\n")}
|
|
|
438
436
|
// AsyncIdConfig: ${names.capital}
|
|
439
437
|
export const ${names.capital}AsyncIdConfig: AsyncIdConfig<${names.capital}SubsetKey, ${names.capital}SubsetMapping, ${listParamsType}> = {
|
|
440
438
|
placeholderKey: "entity.${names.capital}",
|
|
441
|
-
|
|
442
|
-
|
|
439
|
+
listQueryOptions: ${names.capital}Service.${methodName}QueryOptions,
|
|
440
|
+
listInfiniteQueryOptions: ${names.capital}Service.${methodName}InfiniteQueryOptions,
|
|
443
441
|
};
|
|
444
442
|
`.trim(),
|
|
445
443
|
);
|