sales-frontend-components 4.0.0 → 4.1.0
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.cjs.js +16 -5
- package/dist/index.d.ts +45 -26
- package/dist/index.esm.js +16 -5
- package/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -4445,9 +4445,12 @@ async function convertSourceToFile(source, convertType) {
|
|
|
4445
4445
|
}
|
|
4446
4446
|
return imageUrlToFile(source.uri, convertType);
|
|
4447
4447
|
}
|
|
4448
|
-
async function captureNativeDocuments({
|
|
4448
|
+
async function captureNativeDocuments({
|
|
4449
|
+
pageLimit,
|
|
4450
|
+
responseFileType
|
|
4451
|
+
}) {
|
|
4449
4452
|
const clampedPageLimit = clampPageLimit(pageLimit);
|
|
4450
|
-
logCameraDebug("native documentCapture requested", { pageLimit: clampedPageLimit });
|
|
4453
|
+
logCameraDebug("native documentCapture requested", { pageLimit: clampedPageLimit, responseFileType });
|
|
4451
4454
|
const response = await salesFrontendBridge.Bridge.native.documentCapture({ pageLimit: clampedPageLimit });
|
|
4452
4455
|
if (response.uris && response.uris.length > 0) {
|
|
4453
4456
|
logCameraDebug("native documentCapture android uris", { count: response.uris.length });
|
|
@@ -4456,6 +4459,11 @@ async function captureNativeDocuments({ pageLimit }) {
|
|
|
4456
4459
|
if (response.sessionId) {
|
|
4457
4460
|
return pullIosSession(response.sessionId, response.count ?? 0);
|
|
4458
4461
|
}
|
|
4462
|
+
if (response.uri) {
|
|
4463
|
+
const kind = responseFileType ?? (response.uri.startsWith("data:") ? "base64" : "scheme");
|
|
4464
|
+
logCameraDebug("native documentCapture legacy single uri", { kind });
|
|
4465
|
+
return [{ kind, uri: response.uri }];
|
|
4466
|
+
}
|
|
4459
4467
|
logCameraDebug("native documentCapture canceled or empty");
|
|
4460
4468
|
return [];
|
|
4461
4469
|
}
|
|
@@ -4931,6 +4939,7 @@ function useCameraV3({
|
|
|
4931
4939
|
captureEngineType,
|
|
4932
4940
|
resizeTiming = "onCapture",
|
|
4933
4941
|
pageLimit,
|
|
4942
|
+
responseFileType,
|
|
4934
4943
|
useNativeCamera = false,
|
|
4935
4944
|
convertType = "canvas",
|
|
4936
4945
|
maxPhotos,
|
|
@@ -5039,7 +5048,9 @@ function useCameraV3({
|
|
|
5039
5048
|
resizeTiming
|
|
5040
5049
|
});
|
|
5041
5050
|
if (resolvedCaptureEngineType === "native") {
|
|
5042
|
-
captureNativeDocuments({ pageLimit }).then(
|
|
5051
|
+
captureNativeDocuments({ pageLimit, responseFileType }).then(
|
|
5052
|
+
(sources) => storeCapturedSources(sources, "native")
|
|
5053
|
+
);
|
|
5043
5054
|
return;
|
|
5044
5055
|
}
|
|
5045
5056
|
if (resolvedCaptureEngineType === "video") {
|
|
@@ -5160,7 +5171,7 @@ function useCameraV3({
|
|
|
5160
5171
|
}
|
|
5161
5172
|
|
|
5162
5173
|
function useCamera(options = {}) {
|
|
5163
|
-
const camera = useCameraV3({ pageLimit: 1,
|
|
5174
|
+
const camera = useCameraV3({ ...options, pageLimit: 1, resizeTiming: "onCapture" });
|
|
5164
5175
|
const getImage = (imageId) => {
|
|
5165
5176
|
return camera.attachedPhotos.find((image) => image.id === imageId);
|
|
5166
5177
|
};
|
|
@@ -5168,7 +5179,7 @@ function useCamera(options = {}) {
|
|
|
5168
5179
|
}
|
|
5169
5180
|
|
|
5170
5181
|
function useCameraV2(options) {
|
|
5171
|
-
return useCameraV3({ pageLimit: 1,
|
|
5182
|
+
return useCameraV3({ ...options, pageLimit: 1, resizeTiming: "onRetrieve" });
|
|
5172
5183
|
}
|
|
5173
5184
|
|
|
5174
5185
|
const HISTORY_SIZE = 100;
|
package/dist/index.d.ts
CHANGED
|
@@ -176,9 +176,16 @@ interface cameraOptions {
|
|
|
176
176
|
resizeTiming?: ResizeTiming;
|
|
177
177
|
/**
|
|
178
178
|
* 네이티브 멀티페이지 촬영 시 최대 촬영 장수입니다. 1 ~ 20 범위로 clamp 되며 기본값은 1 입니다.
|
|
179
|
-
* V1/V2 래퍼는 항상 1로 고정되어 기존 단일 촬영 동작을 유지합니다.
|
|
179
|
+
* `useCameraV3`부터 파라미터로 사용할 수 있으며, V1/V2 래퍼는 항상 1로 고정되어 기존 단일 촬영 동작을 유지합니다.
|
|
180
180
|
*/
|
|
181
181
|
pageLimit?: number;
|
|
182
|
+
/**
|
|
183
|
+
* 네이티브 응답 형식 힌트입니다. (기존 V1/V2 호환 옵션)
|
|
184
|
+
* 신규 멀티페이지 프로토콜에서는 플랫폼별 응답(Android `uris`, iOS 세션 pull)이 우선하며,
|
|
185
|
+
* 구버전 앱이 단일 `uri`만 반환하는 경우 `scheme`/`base64` 해석 힌트로만 사용됩니다.
|
|
186
|
+
* 브리지 함수(`Bridge.native.documentCapture`)에는 전달되지 않습니다.
|
|
187
|
+
*/
|
|
188
|
+
responseFileType?: 'scheme' | 'base64';
|
|
182
189
|
/**
|
|
183
190
|
* 앱 환경에서 브리지 기반 네이티브 카메라/문서 캡처를 사용할지 여부입니다.
|
|
184
191
|
* @deprecated 신규 구현에서는 `captureEngineType: 'native'` 또는 `'input'`을 사용하세요.
|
|
@@ -188,11 +195,6 @@ interface cameraOptions {
|
|
|
188
195
|
cameraOnly: boolean;
|
|
189
196
|
/** 기본 첨부 버튼 문구를 덮어쓸 때 사용하는 텍스트입니다. */
|
|
190
197
|
buttonText?: string;
|
|
191
|
-
/**
|
|
192
|
-
* 네이티브 캡처 결과의 응답 형식입니다.
|
|
193
|
-
* `scheme`은 파일/커스텀 스킴 URI를, `base64`는 Base64 문자열을 반환하도록 요청합니다.
|
|
194
|
-
*/
|
|
195
|
-
responseFileType: 'base64' | 'scheme';
|
|
196
198
|
/**
|
|
197
199
|
* 이미지 URL을 `File`로 바꿀 때 사용할 변환 방식입니다.
|
|
198
200
|
* `fetch`, `xhr`, `canvas` 중 환경 제약과 호환성에 맞는 전략을 선택할 수 있습니다.
|
|
@@ -213,21 +215,30 @@ interface cameraOptions {
|
|
|
213
215
|
* 핸들러가 호출되면 훅은 해당 입력을 첨부 목록에 등록하지 않습니다.
|
|
214
216
|
*/
|
|
215
217
|
maxPhotosErrorHandler?: (overflow: MaxPhotosOverflowInfo) => void;
|
|
216
|
-
/**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
218
|
+
/**
|
|
219
|
+
* 첨부 후 이미지 크기와 용량을 줄이기 위한 리사이즈 옵션입니다.
|
|
220
|
+
* - 미지정 시 기본 리사이즈 옵션(width 1920 / 약 300KB / jpeg)이 적용됩니다.
|
|
221
|
+
* - `false`를 명시하면 리사이즈/변환 가공을 건너뛰고 원본을 그대로 사용합니다.
|
|
222
|
+
* (네이티브 브릿지가 이미 리사이즈한 이미지를 반환하는 경우 이중 가공을 방지)
|
|
223
|
+
*/
|
|
224
|
+
resize?: ResizeOption | false;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* 이미지 리사이즈 가공 옵션입니다.
|
|
228
|
+
*/
|
|
229
|
+
interface ResizeOption {
|
|
230
|
+
/** 반복 축소 시 한 번에 줄일 비율입니다. `5`면 매 반복마다 약 5%씩 축소합니다. */
|
|
231
|
+
resizeRatio?: number;
|
|
232
|
+
/** 어떤 기준으로 축소할지 결정합니다. 품질만, 픽셀 크기만, 또는 둘 다 조합해 처리할 수 있습니다. */
|
|
233
|
+
processType?: 'quality' | 'px' | 'mixed';
|
|
234
|
+
/** 최종 목표 너비(px)입니다. 높이만 없는 경우 원본 비율을 유지해 자동 계산합니다. */
|
|
235
|
+
width?: number;
|
|
236
|
+
/** 최종 목표 높이(px)입니다. 너비만 없는 경우 원본 비율을 유지해 자동 계산합니다. */
|
|
237
|
+
height?: number;
|
|
238
|
+
/** 최종 목표 파일 크기(byte)입니다. 예: `300 * 1024`는 약 300KB입니다. */
|
|
239
|
+
filesize?: number;
|
|
240
|
+
/** 출력 이미지 확장자입니다. 일반적으로 `jpeg` 또는 `png`를 사용합니다. */
|
|
241
|
+
ext?: string;
|
|
231
242
|
}
|
|
232
243
|
type cameraItemType = 'single' | 'multiple' | 'linear';
|
|
233
244
|
interface AddImageInfo {
|
|
@@ -286,9 +297,12 @@ type MaxPhotosOverflowInfo = {
|
|
|
286
297
|
*
|
|
287
298
|
* 내부적으로 `useCameraV3`를 호출하며, 기존 호환성을 위해 다음을 고정합니다.
|
|
288
299
|
* - `resizeTiming: 'onCapture'` : 촬영 즉시 가공 후 가공본을 썸네일로 저장합니다.
|
|
300
|
+
* - `pageLimit: 1` : 멀티페이지 촬영을 막아 기존의 단일 등록 방식만 허용합니다. (호출부에서 덮어쓸 수 없음)
|
|
289
301
|
* - `getImage` : 기존 동기 시그니처를 유지합니다.
|
|
290
302
|
*
|
|
291
|
-
* `pageLimit`
|
|
303
|
+
* 멀티페이지(`pageLimit` 2 이상) 촬영이 필요하면 `useCameraV3`를 직접 사용하세요.
|
|
304
|
+
* `responseFileType`는 그대로 `useCameraV3`로 전달되어 구버전 앱의 단일 `uri` 해석 힌트로만 쓰이며,
|
|
305
|
+
* 브리지 함수(`Bridge.native.documentCapture`)에는 전달되지 않습니다.
|
|
292
306
|
*
|
|
293
307
|
* @param options 카메라 동작 옵션입니다.
|
|
294
308
|
* @returns 첨부 UI 컴포넌트와 첨부 제어 함수들입니다.
|
|
@@ -308,9 +322,12 @@ declare function useCamera(options?: Partial<cameraOptions>): {
|
|
|
308
322
|
*
|
|
309
323
|
* 내부적으로 `useCameraV3`를 호출하며, 기존 호환성을 위해 다음을 고정합니다.
|
|
310
324
|
* - `resizeTiming: 'onRetrieve'` : 원본을 즉시 썸네일로 표시하고 `getImage` 호출 시점에 가공합니다.
|
|
325
|
+
* - `pageLimit: 1` : 멀티페이지 촬영을 막아 기존의 단일 등록 방식만 허용합니다. (호출부에서 덮어쓸 수 없음)
|
|
311
326
|
* - `getImage` : 기존 비동기 시그니처를 그대로 유지합니다.
|
|
312
327
|
*
|
|
313
|
-
* `pageLimit`
|
|
328
|
+
* 멀티페이지(`pageLimit` 2 이상) 촬영이 필요하면 `useCameraV3`를 직접 사용하세요.
|
|
329
|
+
* `responseFileType`는 그대로 `useCameraV3`로 전달되어 구버전 앱의 단일 `uri` 해석 힌트로만 쓰이며,
|
|
330
|
+
* 브리지 함수(`Bridge.native.documentCapture`)에는 전달되지 않습니다.
|
|
314
331
|
*
|
|
315
332
|
* @param options 카메라 동작 옵션입니다.
|
|
316
333
|
* @returns 첨부 UI 컴포넌트와 첨부 제어 함수들입니다.
|
|
@@ -330,6 +347,8 @@ declare function useCameraV2(options: cameraOptions): {
|
|
|
330
347
|
*
|
|
331
348
|
* - 캡처 엔진: `captureEngineType`(`native` 멀티페이지 / `input` / `video`)으로 선택합니다.
|
|
332
349
|
* - 가공 시점: `resizeTiming`(`onCapture` V1식 / `onRetrieve` V2식)으로 선택합니다.
|
|
350
|
+
* - 리사이즈: `resize` 옵션. 미지정 시 기본 리사이즈가 적용되며, `resize: false`면 리사이즈를 건너뜁니다.
|
|
351
|
+
* (네이티브 브릿지가 이미 리사이즈한 이미지를 반환하는 경우 이중 가공 방지)
|
|
333
352
|
* - 촬영 장수: `pageLimit`(1~20)으로 네이티브 멀티페이지 장수를 선택합니다.
|
|
334
353
|
*
|
|
335
354
|
* ### `maxPhotos` × `pageLimit` 누적 동작 (`type`이 `'multiple'` / `'linear'`)
|
|
@@ -353,7 +372,7 @@ declare function useCameraV2(options: cameraOptions): {
|
|
|
353
372
|
*
|
|
354
373
|
* 공개 API는 단일·자기완결 형태(`getImage`는 항상 비동기)라, 추후 V1/V2 래퍼를 제거해도 단독으로 동작합니다.
|
|
355
374
|
*/
|
|
356
|
-
declare function useCameraV3({ onChange, resize: resizeOption, cameraOnly, onDelete, show, type, buttonText, initData, captureEngineType, resizeTiming, pageLimit, useNativeCamera, convertType, maxPhotos, overMaxPhotosBehavior, maxPhotosErrorHandler }?: Partial<cameraOptions>): {
|
|
375
|
+
declare function useCameraV3({ onChange, resize: resizeOption, cameraOnly, onDelete, show, type, buttonText, initData, captureEngineType, resizeTiming, pageLimit, responseFileType, useNativeCamera, convertType, maxPhotos, overMaxPhotosBehavior, maxPhotosErrorHandler }?: Partial<cameraOptions>): {
|
|
357
376
|
onClick: () => void;
|
|
358
377
|
getImage: (imageId: string) => Promise<AttachedPhoto>;
|
|
359
378
|
deleteImage: (imageId: string) => void;
|
|
@@ -371,7 +390,7 @@ declare function useCameraV3({ onChange, resize: resizeOption, cameraOnly, onDel
|
|
|
371
390
|
* @param resizeRatio 1회 반복 시 축소 비율 (단위: %)
|
|
372
391
|
* 기본값 5 = 1회 반복 시 5%씩 축소
|
|
373
392
|
*/
|
|
374
|
-
declare function resize<T extends string | File>(image: T, options?:
|
|
393
|
+
declare function resize<T extends string | File>(image: T, options?: ResizeOption): Promise<T>;
|
|
375
394
|
|
|
376
395
|
interface AttachmentProps {
|
|
377
396
|
photos: AttachedPhoto[];
|
|
@@ -1309,4 +1328,4 @@ interface UseTermsReturn<T> {
|
|
|
1309
1328
|
declare function useTerms<T extends object>(initialValue: T): UseTermsReturn<T>;
|
|
1310
1329
|
|
|
1311
1330
|
export { AUTH_TEMPLATE_CODES, Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, GtmIframe, HookFormCheckbox, HookFormCheckboxButton, HookFormDatePickerRenew, HookFormDateRangePickerRenew, HookFormSearchJobField, HookFormSegmentGroup, HookFormSelect, HookFormTextField, JobVehicleSearchModal, OrganizationSearchModal, RATING_DATA, RIV_SEARCH_PARAM_MAP, RemoteIdentityVerification, RivModalIframe, StepIndicator, TermsCancerCollectQR, TermsCancerMarketing, TermsCancerProvideQR, TermsCancerSystem, TermsCheckboxButton, TermsDesign, TermsExecution, TermsLoan, TermsMarketing, TermsMarketingCollectQR, TermsMarketingProviderQR, TermsMobileCard, TermsRadio, TermsRatingBar, TermsSignature, TermsTransfer, VERIFICATION_CODES, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCameraV2, useCameraV3, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useSearchAddress, useSearchNationality, useSearchVisa, useTerms, useVisaComponent };
|
|
1312
|
-
export type { AddImageInfo, AttachedPhoto, AttachmentProps, AuthCodeSet, AuthStep, BankStockSearchModalProps, BaseTermsProps, CaptureEngineType, CapturedSource, CustomerSearchProps, DownloadProps, DownloadTargetInfo, DownloaderProps, FormFactor, HookFormCheckboxButtonProps, HookFormCheckboxProps, HookFormDatePickerRenewProps, HookFormDateRangePickerRenewProps, HookFormSearchJobFieldProps, HookFormSegmentGroupProps, HookFormSelectProps, HookFormTextFieldProps, InitSearchParams, MaxPhotosOverflowInfo, MaxPhotosOverflowSource, OverMaxPhotosBehavior, PaintProps, Pen, RemoteIdentityVerificationProps, RemoteIdentityVerificationSuccess, RemoteIdentityVerificationViewForwardProps, RemoteIdentityVerificationViewProps, ResizeTiming, RivModalIframeProps, RivModalIframeReturnProps, RivUrlParams, SearchInputProps, StepIndicatorProps, StepItem, TermsCancerMarketingData, TermsCancerMarketingProps, TermsCancerSystemData, TermsCancerSystemDataProps, TermsDesignData, TermsDesignProps, TermsExecutionData, TermsExecutionProps, TermsLoanData, TermsLoanDataProps, TermsMarketingData, TermsMarketingProps, TermsRadioOption, TermsRatingType, TermsSignatureData, UseRemoteIdentityVerificationProps, UseRemoteIdentityVerificationReturn, UseTermsReturn, Vehicle, VerificationResponse, cameraItemType, cameraOptions };
|
|
1331
|
+
export type { AddImageInfo, AttachedPhoto, AttachmentProps, AuthCodeSet, AuthStep, BankStockSearchModalProps, BaseTermsProps, CaptureEngineType, CapturedSource, CustomerSearchProps, DownloadProps, DownloadTargetInfo, DownloaderProps, FormFactor, HookFormCheckboxButtonProps, HookFormCheckboxProps, HookFormDatePickerRenewProps, HookFormDateRangePickerRenewProps, HookFormSearchJobFieldProps, HookFormSegmentGroupProps, HookFormSelectProps, HookFormTextFieldProps, InitSearchParams, MaxPhotosOverflowInfo, MaxPhotosOverflowSource, OverMaxPhotosBehavior, PaintProps, Pen, RemoteIdentityVerificationProps, RemoteIdentityVerificationSuccess, RemoteIdentityVerificationViewForwardProps, RemoteIdentityVerificationViewProps, ResizeOption, ResizeTiming, RivModalIframeProps, RivModalIframeReturnProps, RivUrlParams, SearchInputProps, StepIndicatorProps, StepItem, TermsCancerMarketingData, TermsCancerMarketingProps, TermsCancerSystemData, TermsCancerSystemDataProps, TermsDesignData, TermsDesignProps, TermsExecutionData, TermsExecutionProps, TermsLoanData, TermsLoanDataProps, TermsMarketingData, TermsMarketingProps, TermsRadioOption, TermsRatingType, TermsSignatureData, UseRemoteIdentityVerificationProps, UseRemoteIdentityVerificationReturn, UseTermsReturn, Vehicle, VerificationResponse, cameraItemType, cameraOptions };
|
package/dist/index.esm.js
CHANGED
|
@@ -4443,9 +4443,12 @@ async function convertSourceToFile(source, convertType) {
|
|
|
4443
4443
|
}
|
|
4444
4444
|
return imageUrlToFile(source.uri, convertType);
|
|
4445
4445
|
}
|
|
4446
|
-
async function captureNativeDocuments({
|
|
4446
|
+
async function captureNativeDocuments({
|
|
4447
|
+
pageLimit,
|
|
4448
|
+
responseFileType
|
|
4449
|
+
}) {
|
|
4447
4450
|
const clampedPageLimit = clampPageLimit(pageLimit);
|
|
4448
|
-
logCameraDebug("native documentCapture requested", { pageLimit: clampedPageLimit });
|
|
4451
|
+
logCameraDebug("native documentCapture requested", { pageLimit: clampedPageLimit, responseFileType });
|
|
4449
4452
|
const response = await Bridge.native.documentCapture({ pageLimit: clampedPageLimit });
|
|
4450
4453
|
if (response.uris && response.uris.length > 0) {
|
|
4451
4454
|
logCameraDebug("native documentCapture android uris", { count: response.uris.length });
|
|
@@ -4454,6 +4457,11 @@ async function captureNativeDocuments({ pageLimit }) {
|
|
|
4454
4457
|
if (response.sessionId) {
|
|
4455
4458
|
return pullIosSession(response.sessionId, response.count ?? 0);
|
|
4456
4459
|
}
|
|
4460
|
+
if (response.uri) {
|
|
4461
|
+
const kind = responseFileType ?? (response.uri.startsWith("data:") ? "base64" : "scheme");
|
|
4462
|
+
logCameraDebug("native documentCapture legacy single uri", { kind });
|
|
4463
|
+
return [{ kind, uri: response.uri }];
|
|
4464
|
+
}
|
|
4457
4465
|
logCameraDebug("native documentCapture canceled or empty");
|
|
4458
4466
|
return [];
|
|
4459
4467
|
}
|
|
@@ -4929,6 +4937,7 @@ function useCameraV3({
|
|
|
4929
4937
|
captureEngineType,
|
|
4930
4938
|
resizeTiming = "onCapture",
|
|
4931
4939
|
pageLimit,
|
|
4940
|
+
responseFileType,
|
|
4932
4941
|
useNativeCamera = false,
|
|
4933
4942
|
convertType = "canvas",
|
|
4934
4943
|
maxPhotos,
|
|
@@ -5037,7 +5046,9 @@ function useCameraV3({
|
|
|
5037
5046
|
resizeTiming
|
|
5038
5047
|
});
|
|
5039
5048
|
if (resolvedCaptureEngineType === "native") {
|
|
5040
|
-
captureNativeDocuments({ pageLimit }).then(
|
|
5049
|
+
captureNativeDocuments({ pageLimit, responseFileType }).then(
|
|
5050
|
+
(sources) => storeCapturedSources(sources, "native")
|
|
5051
|
+
);
|
|
5041
5052
|
return;
|
|
5042
5053
|
}
|
|
5043
5054
|
if (resolvedCaptureEngineType === "video") {
|
|
@@ -5158,7 +5169,7 @@ function useCameraV3({
|
|
|
5158
5169
|
}
|
|
5159
5170
|
|
|
5160
5171
|
function useCamera(options = {}) {
|
|
5161
|
-
const camera = useCameraV3({ pageLimit: 1,
|
|
5172
|
+
const camera = useCameraV3({ ...options, pageLimit: 1, resizeTiming: "onCapture" });
|
|
5162
5173
|
const getImage = (imageId) => {
|
|
5163
5174
|
return camera.attachedPhotos.find((image) => image.id === imageId);
|
|
5164
5175
|
};
|
|
@@ -5166,7 +5177,7 @@ function useCamera(options = {}) {
|
|
|
5166
5177
|
}
|
|
5167
5178
|
|
|
5168
5179
|
function useCameraV2(options) {
|
|
5169
|
-
return useCameraV3({ pageLimit: 1,
|
|
5180
|
+
return useCameraV3({ ...options, pageLimit: 1, resizeTiming: "onRetrieve" });
|
|
5170
5181
|
}
|
|
5171
5182
|
|
|
5172
5183
|
const HISTORY_SIZE = 100;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sales-frontend-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"sales-frontend-stores": "0.0.15",
|
|
46
46
|
"sales-frontend-typescript-config": "0.0.2",
|
|
47
47
|
"sales-frontend-assets": "0.0.29",
|
|
48
|
-
"sales-frontend-api": "1.0.
|
|
49
|
-
"sales-frontend-design-system": "0.4.
|
|
50
|
-
"sales-frontend-bridge": "0.1.
|
|
48
|
+
"sales-frontend-api": "1.0.1",
|
|
49
|
+
"sales-frontend-design-system": "0.4.1",
|
|
50
|
+
"sales-frontend-bridge": "0.1.1",
|
|
51
51
|
"sales-frontend-hooks": "0.0.182",
|
|
52
52
|
"sales-frontend-solution": "0.0.61",
|
|
53
53
|
"sales-frontend-debug": "0.0.80",
|
|
54
|
-
"sales-frontend-headless": "1.0.
|
|
54
|
+
"sales-frontend-headless": "1.0.1",
|
|
55
55
|
"sales-frontend-vitest-config": "0.0.4"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"react": ">=19.0.0",
|
|
60
60
|
"react-dom": ">=19.0.0",
|
|
61
61
|
"react-hook-form": "^7.58.1",
|
|
62
|
-
"sales-frontend-api": "1.0.
|
|
62
|
+
"sales-frontend-api": "1.0.1",
|
|
63
63
|
"sales-frontend-assets": "0.0.29",
|
|
64
64
|
"sales-frontend-stores": "0.0.15",
|
|
65
|
-
"sales-frontend-design-system": "0.4.
|
|
66
|
-
"sales-frontend-bridge": "0.1.
|
|
67
|
-
"sales-frontend-headless": "1.0.
|
|
65
|
+
"sales-frontend-design-system": "0.4.1",
|
|
66
|
+
"sales-frontend-bridge": "0.1.1",
|
|
67
|
+
"sales-frontend-headless": "1.0.1",
|
|
68
68
|
"sales-frontend-hooks": "0.0.182",
|
|
69
69
|
"sales-frontend-solution": "0.0.61"
|
|
70
70
|
},
|