@gorgo/medusa-integration 0.1.5 → 0.2.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/.medusa/server/src/admin/index.js +1370 -761
- package/.medusa/server/src/admin/index.mjs +1372 -763
- package/.medusa/server/src/modules/integration/models/integration.d.ts +1 -1
- package/.medusa/server/src/modules/integration/services/integration-module.d.ts +2 -2
- package/.medusa/server/src/workflows/integration/steps/set-integration-enabled.d.ts +1 -1
- package/.medusa/server/src/workflows/integration/workflows/set-integration-enabled.d.ts +1 -1
- package/README.md +3 -0
- package/package.json +6 -4
|
@@ -121,9 +121,9 @@ const IntegrationsPage = () => {
|
|
|
121
121
|
queryFn: () => sdk.client.fetch("/admin/integrations", { query: queryParams }),
|
|
122
122
|
placeholderData: reactQuery.keepPreviousData
|
|
123
123
|
});
|
|
124
|
-
const integrations =
|
|
125
|
-
const count =
|
|
126
|
-
const categories =
|
|
124
|
+
const integrations = data?.integrations ?? [];
|
|
125
|
+
const count = data?.count ?? 0;
|
|
126
|
+
const categories = data?.categories ?? [];
|
|
127
127
|
const invalidate = () => qc.invalidateQueries({ queryKey: ["integration-overview"] });
|
|
128
128
|
const toggleEnabled = reactQuery.useMutation({
|
|
129
129
|
mutationFn: ({ providerId, next }) => sdk.client.fetch(`/admin/integrations/${providerId}/enable`, {
|
|
@@ -134,7 +134,7 @@ const IntegrationsPage = () => {
|
|
|
134
134
|
ui.toast.success(next ? t("integration.toast.enabled") : t("integration.toast.disabled"));
|
|
135
135
|
invalidate();
|
|
136
136
|
},
|
|
137
|
-
onError: (e) => ui.toast.error(
|
|
137
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.updateFailed"))
|
|
138
138
|
});
|
|
139
139
|
const test = reactQuery.useMutation({
|
|
140
140
|
mutationFn: (providerId) => sdk.client.fetch(
|
|
@@ -145,7 +145,7 @@ const IntegrationsPage = () => {
|
|
|
145
145
|
r.status === "passed" ? ui.toast.success(t("integration.toast.connectionOk")) : ui.toast.warning(r.message ?? r.status);
|
|
146
146
|
invalidate();
|
|
147
147
|
},
|
|
148
|
-
onError: (e) => ui.toast.error(
|
|
148
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.testFailed"))
|
|
149
149
|
});
|
|
150
150
|
const remove = reactQuery.useMutation({
|
|
151
151
|
mutationFn: (providerId) => sdk.client.fetch(`/admin/integrations/${providerId}`, { method: "DELETE" }),
|
|
@@ -153,7 +153,7 @@ const IntegrationsPage = () => {
|
|
|
153
153
|
ui.toast.success(t("integration.toast.deleted"));
|
|
154
154
|
invalidate();
|
|
155
155
|
},
|
|
156
|
-
onError: (e) => ui.toast.error(
|
|
156
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.deleteFailed"))
|
|
157
157
|
});
|
|
158
158
|
const onDelete = async (item) => {
|
|
159
159
|
const confirmed = await prompt({
|
|
@@ -297,7 +297,6 @@ const IntegrationFieldValue = ({
|
|
|
297
297
|
value,
|
|
298
298
|
secretConfigured = false
|
|
299
299
|
}) => {
|
|
300
|
-
var _a;
|
|
301
300
|
const { t } = reactI18next.useTranslation();
|
|
302
301
|
if (field.secret || field.control === "secret") {
|
|
303
302
|
return secretConfigured ? /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "small", leading: "compact", children: "••••••••" }) : /* @__PURE__ */ jsxRuntime.jsx(Dash, {});
|
|
@@ -315,61 +314,51 @@ const IntegrationFieldValue = ({
|
|
|
315
314
|
}
|
|
316
315
|
if (value == null || value === "") return /* @__PURE__ */ jsxRuntime.jsx(Dash, {});
|
|
317
316
|
if (field.control === "select") {
|
|
318
|
-
const labelKey =
|
|
317
|
+
const labelKey = field.optionLabels?.[String(value)];
|
|
319
318
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { size: "2xsmall", color: "grey", children: labelKey ? t(labelKey) : String(value) });
|
|
320
319
|
}
|
|
321
320
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "small", leading: "compact", children: String(value) });
|
|
322
321
|
};
|
|
323
322
|
var isCheckBoxInput = (element) => element.type === "checkbox";
|
|
323
|
+
var isFileInput = (element) => element.type === "file";
|
|
324
324
|
var isDateObject = (value) => value instanceof Date;
|
|
325
325
|
var isNullOrUndefined = (value) => value == null;
|
|
326
326
|
const isObjectType = (value) => typeof value === "object";
|
|
327
327
|
var isObject = (value) => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType(value) && !isDateObject(value);
|
|
328
|
-
var getEventValue = (event) => isObject(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event;
|
|
329
|
-
var
|
|
330
|
-
var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
|
|
328
|
+
var getEventValue = (event) => isObject(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : isFileInput(event.target) ? event.target.files : event.target.value : event;
|
|
329
|
+
var isNameInFieldArray = (names, name) => name.split(".").some((part, index, arr) => !isNaN(Number(part)) && names.has(arr.slice(0, index).join(".")));
|
|
331
330
|
var isPlainObject = (tempObject) => {
|
|
332
331
|
const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
|
|
333
332
|
return isObject(prototypeCopy) && prototypeCopy.hasOwnProperty("isPrototypeOf");
|
|
334
333
|
};
|
|
335
334
|
var isWeb = typeof window !== "undefined" && typeof window.HTMLElement !== "undefined" && typeof document !== "undefined";
|
|
336
335
|
function cloneObject(data) {
|
|
337
|
-
let copy;
|
|
338
|
-
const isArray = Array.isArray(data);
|
|
339
336
|
if (data instanceof Date) {
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
copy = isArray ? [] : {};
|
|
345
|
-
if (!isArray && !isPlainObject(data)) {
|
|
346
|
-
copy = data;
|
|
347
|
-
} else {
|
|
348
|
-
for (const key in data) {
|
|
349
|
-
if (data.hasOwnProperty(key)) {
|
|
350
|
-
copy[key] = cloneObject(data[key]);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
} else {
|
|
337
|
+
return new Date(data);
|
|
338
|
+
}
|
|
339
|
+
const isFileListInstance = typeof FileList !== "undefined" && data instanceof FileList;
|
|
340
|
+
if (isWeb && (data instanceof Blob || isFileListInstance)) {
|
|
355
341
|
return data;
|
|
356
342
|
}
|
|
343
|
+
const isArray = Array.isArray(data);
|
|
344
|
+
if (!isArray && !(isObject(data) && isPlainObject(data))) {
|
|
345
|
+
return data;
|
|
346
|
+
}
|
|
347
|
+
const copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
|
|
348
|
+
for (const key in data) {
|
|
349
|
+
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
350
|
+
copy[key] = cloneObject(data[key]);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
357
353
|
return copy;
|
|
358
354
|
}
|
|
359
|
-
var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
|
|
360
|
-
var isUndefined = (val) => val === void 0;
|
|
361
|
-
var get = (object, path, defaultValue) => {
|
|
362
|
-
if (!path || !isObject(object)) {
|
|
363
|
-
return defaultValue;
|
|
364
|
-
}
|
|
365
|
-
const result = compact(path.split(/[,[\].]+?/)).reduce((result2, key) => isNullOrUndefined(result2) ? result2 : result2[key], object);
|
|
366
|
-
return isUndefined(result) || result === object ? isUndefined(object[path]) ? defaultValue : object[path] : result;
|
|
367
|
-
};
|
|
368
|
-
var isBoolean = (value) => typeof value === "boolean";
|
|
369
355
|
const EVENTS = {
|
|
370
356
|
BLUR: "blur",
|
|
371
357
|
FOCUS_OUT: "focusout",
|
|
372
|
-
CHANGE: "change"
|
|
358
|
+
CHANGE: "change",
|
|
359
|
+
SUBMIT: "submit",
|
|
360
|
+
TRIGGER: "trigger",
|
|
361
|
+
VALID: "valid"
|
|
373
362
|
};
|
|
374
363
|
const VALIDATION_MODE = {
|
|
375
364
|
onBlur: "onBlur",
|
|
@@ -387,12 +376,52 @@ const INPUT_VALIDATION_RULES = {
|
|
|
387
376
|
required: "required",
|
|
388
377
|
validate: "validate"
|
|
389
378
|
};
|
|
390
|
-
const
|
|
391
|
-
const
|
|
379
|
+
const ROOT_ERROR_TYPE = "root";
|
|
380
|
+
const PROTOTYPE_KEYWORDS = ["__proto__", "constructor", "prototype"];
|
|
381
|
+
const IS_KEY_RE = /^\w*$/;
|
|
382
|
+
var isKey = (value) => IS_KEY_RE.test(value);
|
|
383
|
+
var isUndefined = (val) => val === void 0;
|
|
384
|
+
const FIELD_PATH_RE = /[.[\]'"]/;
|
|
385
|
+
var stringToPath = (input) => input.split(FIELD_PATH_RE).filter(Boolean);
|
|
386
|
+
var get = (object, path, defaultValue) => {
|
|
387
|
+
if (!path || !isObject(object)) {
|
|
388
|
+
return defaultValue;
|
|
389
|
+
}
|
|
390
|
+
const paths = isKey(path) ? [path] : stringToPath(path);
|
|
391
|
+
if (paths.some((key) => PROTOTYPE_KEYWORDS.includes(key))) {
|
|
392
|
+
return defaultValue;
|
|
393
|
+
}
|
|
394
|
+
const result = paths.reduce((result2, key) => {
|
|
395
|
+
return isNullOrUndefined(result2) ? void 0 : result2[key];
|
|
396
|
+
}, object);
|
|
397
|
+
return isUndefined(result) || result === object ? isUndefined(object[path]) ? defaultValue : object[path] : result;
|
|
398
|
+
};
|
|
399
|
+
var isBoolean = (value) => typeof value === "boolean";
|
|
400
|
+
var isFunction = (value) => typeof value === "function";
|
|
401
|
+
var set = (object, path, value) => {
|
|
402
|
+
let index = -1;
|
|
403
|
+
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
404
|
+
const length = tempPath.length;
|
|
405
|
+
const lastIndex = length - 1;
|
|
406
|
+
while (++index < length) {
|
|
407
|
+
const key = tempPath[index];
|
|
408
|
+
let newValue = value;
|
|
409
|
+
if (index !== lastIndex) {
|
|
410
|
+
const objValue = object[key];
|
|
411
|
+
newValue = isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {};
|
|
412
|
+
}
|
|
413
|
+
if (PROTOTYPE_KEYWORDS.includes(key)) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
object[key] = newValue;
|
|
417
|
+
object = object[key];
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
const HookFormControlContext = React__default.default.createContext(null);
|
|
421
|
+
HookFormControlContext.displayName = "HookFormControlContext";
|
|
422
|
+
const useFormControlContext = () => React__default.default.useContext(HookFormControlContext);
|
|
392
423
|
var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
|
|
393
|
-
const result = {
|
|
394
|
-
defaultValues: control._defaultValues
|
|
395
|
-
};
|
|
424
|
+
const result = {};
|
|
396
425
|
for (const key in formState) {
|
|
397
426
|
Object.defineProperty(result, key, {
|
|
398
427
|
get: () => {
|
|
@@ -407,58 +436,40 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
|
|
|
407
436
|
}
|
|
408
437
|
return result;
|
|
409
438
|
};
|
|
410
|
-
|
|
411
|
-
var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
|
|
412
|
-
updateFormState(formStateData);
|
|
413
|
-
const { name, ...formState } = formStateData;
|
|
414
|
-
return isEmptyObject(formState) || Object.keys(formState).length >= Object.keys(_proxyFormState).length || Object.keys(formState).find((key) => _proxyFormState[key] === (!isRoot || VALIDATION_MODE.all));
|
|
415
|
-
};
|
|
416
|
-
var convertToArrayPayload = (value) => Array.isArray(value) ? value : [value];
|
|
417
|
-
var shouldSubscribeByName = (name, signalName, exact) => !name || !signalName || name === signalName || convertToArrayPayload(name).some((currentName) => currentName && (exact ? currentName === signalName : currentName.startsWith(signalName) || signalName.startsWith(currentName)));
|
|
418
|
-
function useSubscribe(props) {
|
|
419
|
-
const _props = React__default.default.useRef(props);
|
|
420
|
-
_props.current = props;
|
|
421
|
-
React__default.default.useEffect(() => {
|
|
422
|
-
const subscription = !props.disabled && _props.current.subject && _props.current.subject.subscribe({
|
|
423
|
-
next: _props.current.next
|
|
424
|
-
});
|
|
425
|
-
return () => {
|
|
426
|
-
subscription && subscription.unsubscribe();
|
|
427
|
-
};
|
|
428
|
-
}, [props.disabled]);
|
|
429
|
-
}
|
|
439
|
+
const useIsomorphicLayoutEffect = isWeb ? React__default.default.useLayoutEffect : React__default.default.useEffect;
|
|
430
440
|
function useFormState(props) {
|
|
431
|
-
const
|
|
432
|
-
const { control =
|
|
433
|
-
const [formState, updateFormState] = React__default.default.useState(
|
|
434
|
-
|
|
441
|
+
const formControl = useFormControlContext();
|
|
442
|
+
const { control = formControl, disabled, name, exact } = props || {};
|
|
443
|
+
const [formState, updateFormState] = React__default.default.useState(() => ({
|
|
444
|
+
...control._formState,
|
|
445
|
+
defaultValues: control._defaultValues
|
|
446
|
+
}));
|
|
435
447
|
const _localProxyFormState = React__default.default.useRef({
|
|
436
448
|
isDirty: false,
|
|
437
449
|
isLoading: false,
|
|
438
450
|
dirtyFields: false,
|
|
439
451
|
touchedFields: false,
|
|
452
|
+
validatingFields: false,
|
|
440
453
|
isValidating: false,
|
|
441
454
|
isValid: false,
|
|
442
455
|
errors: false
|
|
443
456
|
});
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
457
|
+
useIsomorphicLayoutEffect(() => control._subscribe({
|
|
458
|
+
name,
|
|
459
|
+
formState: _localProxyFormState.current,
|
|
460
|
+
exact,
|
|
461
|
+
callback: (formState2) => {
|
|
462
|
+
!disabled && updateFormState({
|
|
463
|
+
...control._formState,
|
|
464
|
+
...formState2,
|
|
465
|
+
defaultValues: control._defaultValues
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}), [name, disabled, exact]);
|
|
454
469
|
React__default.default.useEffect(() => {
|
|
455
|
-
|
|
456
|
-
_localProxyFormState.current.isValid && control._updateValid(true);
|
|
457
|
-
return () => {
|
|
458
|
-
_mounted.current = false;
|
|
459
|
-
};
|
|
470
|
+
_localProxyFormState.current.isValid && control._setValid(true);
|
|
460
471
|
}, [control]);
|
|
461
|
-
return getProxyFormState(formState, control, _localProxyFormState.current, false);
|
|
472
|
+
return React__default.default.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
|
|
462
473
|
}
|
|
463
474
|
var isString = (value) => typeof value === "string";
|
|
464
475
|
var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
|
|
@@ -472,152 +483,250 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
|
472
483
|
isGlobal && (_names.watchAll = true);
|
|
473
484
|
return formValues;
|
|
474
485
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
+
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
487
|
+
const isEmptyObjectWithCustomPrototype = (object, keys) => keys.length === 0 && !Array.isArray(object) && !isPlainObject(object);
|
|
488
|
+
function deepEqual(object1, object2, visited = /* @__PURE__ */ new WeakMap()) {
|
|
489
|
+
if (object1 === object2) {
|
|
490
|
+
return true;
|
|
491
|
+
}
|
|
492
|
+
if (isPrimitive(object1) || isPrimitive(object2)) {
|
|
493
|
+
return Object.is(object1, object2);
|
|
494
|
+
}
|
|
495
|
+
if (isDateObject(object1) && isDateObject(object2)) {
|
|
496
|
+
return Object.is(object1.getTime(), object2.getTime());
|
|
497
|
+
}
|
|
498
|
+
const keys1 = Object.keys(object1);
|
|
499
|
+
const keys2 = Object.keys(object2);
|
|
500
|
+
if (keys1.length !== keys2.length) {
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
if (isEmptyObjectWithCustomPrototype(object1, keys1) || isEmptyObjectWithCustomPrototype(object2, keys2)) {
|
|
504
|
+
return Object.is(object1, object2);
|
|
505
|
+
}
|
|
506
|
+
if (!keys1.length && Array.isArray(object1) !== Array.isArray(object2)) {
|
|
507
|
+
return false;
|
|
508
|
+
}
|
|
509
|
+
const visitedPairs = visited.get(object1);
|
|
510
|
+
if (visitedPairs && visitedPairs.has(object2)) {
|
|
511
|
+
return true;
|
|
512
|
+
}
|
|
513
|
+
if (visitedPairs) {
|
|
514
|
+
visitedPairs.add(object2);
|
|
515
|
+
} else {
|
|
516
|
+
const ws = /* @__PURE__ */ new WeakSet();
|
|
517
|
+
ws.add(object2);
|
|
518
|
+
visited.set(object1, ws);
|
|
519
|
+
}
|
|
520
|
+
for (const key of keys1) {
|
|
521
|
+
const val1 = object1[key];
|
|
522
|
+
if (!(key in object2)) {
|
|
523
|
+
return false;
|
|
524
|
+
}
|
|
525
|
+
if (key !== "ref") {
|
|
526
|
+
const val2 = object2[key];
|
|
527
|
+
if (isDateObject(val1) && isDateObject(val2) || (isObject(val1) || Array.isArray(val1)) && (isObject(val2) || Array.isArray(val2)) ? !deepEqual(val1, val2, visited) : !Object.is(val1, val2)) {
|
|
528
|
+
return false;
|
|
486
529
|
}
|
|
487
530
|
}
|
|
531
|
+
}
|
|
532
|
+
return true;
|
|
533
|
+
}
|
|
534
|
+
function useWatch(props) {
|
|
535
|
+
const formControl = useFormControlContext();
|
|
536
|
+
const { control = formControl, name, defaultValue, disabled, exact, compute } = props || {};
|
|
537
|
+
const _defaultValue = React__default.default.useRef(defaultValue);
|
|
538
|
+
const _compute = React__default.default.useRef(compute);
|
|
539
|
+
const _computeFormValues = React__default.default.useRef(void 0);
|
|
540
|
+
const _prevControl = React__default.default.useRef(control);
|
|
541
|
+
const _prevName = React__default.default.useRef(name);
|
|
542
|
+
_compute.current = compute;
|
|
543
|
+
const [value, updateValue] = React__default.default.useState(() => {
|
|
544
|
+
const defaultValue2 = control._getWatch(name, _defaultValue.current);
|
|
545
|
+
return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
|
|
488
546
|
});
|
|
489
|
-
const
|
|
547
|
+
const getCurrentOutput = React__default.default.useCallback((values) => {
|
|
548
|
+
const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
|
|
549
|
+
return _compute.current ? _compute.current(formValues) : formValues;
|
|
550
|
+
}, [control._formValues, control._names, name]);
|
|
551
|
+
const refreshValue = React__default.default.useCallback((values) => {
|
|
552
|
+
if (!disabled) {
|
|
553
|
+
const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
|
|
554
|
+
if (_compute.current) {
|
|
555
|
+
const computedFormValues = _compute.current(formValues);
|
|
556
|
+
if (!deepEqual(computedFormValues, _computeFormValues.current)) {
|
|
557
|
+
updateValue(computedFormValues);
|
|
558
|
+
_computeFormValues.current = computedFormValues;
|
|
559
|
+
}
|
|
560
|
+
} else {
|
|
561
|
+
updateValue(formValues);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}, [control._formValues, control._names, disabled, name]);
|
|
565
|
+
useIsomorphicLayoutEffect(() => {
|
|
566
|
+
if (_prevControl.current !== control || !deepEqual(_prevName.current, name)) {
|
|
567
|
+
_prevControl.current = control;
|
|
568
|
+
_prevName.current = name;
|
|
569
|
+
refreshValue();
|
|
570
|
+
}
|
|
571
|
+
return control._subscribe({
|
|
572
|
+
name,
|
|
573
|
+
formState: {
|
|
574
|
+
values: true
|
|
575
|
+
},
|
|
576
|
+
exact,
|
|
577
|
+
callback: (formState) => {
|
|
578
|
+
refreshValue(formState.values);
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
}, [control, exact, name, refreshValue]);
|
|
490
582
|
React__default.default.useEffect(() => control._removeUnmounted());
|
|
491
|
-
|
|
583
|
+
const controlChanged = _prevControl.current !== control;
|
|
584
|
+
const prevName = _prevName.current;
|
|
585
|
+
const computedOutput = React__default.default.useMemo(() => {
|
|
586
|
+
if (disabled) {
|
|
587
|
+
return null;
|
|
588
|
+
}
|
|
589
|
+
const nameChanged = !controlChanged && !deepEqual(prevName, name);
|
|
590
|
+
const shouldReturnImmediate = controlChanged || nameChanged;
|
|
591
|
+
return shouldReturnImmediate ? getCurrentOutput() : null;
|
|
592
|
+
}, [disabled, controlChanged, name, prevName, getCurrentOutput]);
|
|
593
|
+
return computedOutput !== null ? computedOutput : value;
|
|
492
594
|
}
|
|
493
|
-
var isKey = (value) => /^\w*$/.test(value);
|
|
494
|
-
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, "").split(/\.|\[/));
|
|
495
|
-
var set = (object, path, value) => {
|
|
496
|
-
let index = -1;
|
|
497
|
-
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
498
|
-
const length = tempPath.length;
|
|
499
|
-
const lastIndex = length - 1;
|
|
500
|
-
while (++index < length) {
|
|
501
|
-
const key = tempPath[index];
|
|
502
|
-
let newValue = value;
|
|
503
|
-
if (index !== lastIndex) {
|
|
504
|
-
const objValue = object[key];
|
|
505
|
-
newValue = isObject(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index + 1]) ? [] : {};
|
|
506
|
-
}
|
|
507
|
-
object[key] = newValue;
|
|
508
|
-
object = object[key];
|
|
509
|
-
}
|
|
510
|
-
return object;
|
|
511
|
-
};
|
|
512
595
|
function useController(props) {
|
|
513
|
-
const
|
|
514
|
-
const { name, disabled, control =
|
|
596
|
+
const formControl = useFormControlContext();
|
|
597
|
+
const { name, disabled, control = formControl, shouldUnregister, defaultValue, exact = true } = props;
|
|
515
598
|
const isArrayField = isNameInFieldArray(control._names.array, name);
|
|
599
|
+
const defaultValueMemo = React__default.default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
|
|
516
600
|
const value = useWatch({
|
|
517
601
|
control,
|
|
518
602
|
name,
|
|
519
|
-
defaultValue:
|
|
520
|
-
exact
|
|
603
|
+
defaultValue: defaultValueMemo,
|
|
604
|
+
exact
|
|
521
605
|
});
|
|
522
606
|
const formState = useFormState({
|
|
523
607
|
control,
|
|
524
|
-
name
|
|
608
|
+
name,
|
|
609
|
+
exact
|
|
525
610
|
});
|
|
611
|
+
const _props = React__default.default.useRef(props);
|
|
612
|
+
const _proxyRef = React__default.default.useRef(null);
|
|
526
613
|
const _registerProps = React__default.default.useRef(control.register(name, {
|
|
527
614
|
...props.rules,
|
|
528
615
|
value,
|
|
529
616
|
...isBoolean(props.disabled) ? { disabled: props.disabled } : {}
|
|
530
617
|
}));
|
|
618
|
+
_props.current = props;
|
|
619
|
+
const fieldState = React__default.default.useMemo(() => Object.defineProperties({}, {
|
|
620
|
+
invalid: {
|
|
621
|
+
enumerable: true,
|
|
622
|
+
get: () => !!get(formState.errors, name)
|
|
623
|
+
},
|
|
624
|
+
isDirty: {
|
|
625
|
+
enumerable: true,
|
|
626
|
+
get: () => !!get(formState.dirtyFields, name)
|
|
627
|
+
},
|
|
628
|
+
isTouched: {
|
|
629
|
+
enumerable: true,
|
|
630
|
+
get: () => !!get(formState.touchedFields, name)
|
|
631
|
+
},
|
|
632
|
+
isValidating: {
|
|
633
|
+
enumerable: true,
|
|
634
|
+
get: () => !!get(formState.validatingFields, name)
|
|
635
|
+
},
|
|
636
|
+
error: {
|
|
637
|
+
enumerable: true,
|
|
638
|
+
get: () => get(formState.errors, name)
|
|
639
|
+
}
|
|
640
|
+
}), [formState, name]);
|
|
641
|
+
const onChange = React__default.default.useCallback((event) => {
|
|
642
|
+
const value2 = getEventValue(event);
|
|
643
|
+
if (!get(control._fields, name)) {
|
|
644
|
+
_registerProps.current = control.register(name, {
|
|
645
|
+
..._props.current.rules,
|
|
646
|
+
value: value2
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
return _registerProps.current.onChange({
|
|
650
|
+
target: {
|
|
651
|
+
value: getEventValue(event),
|
|
652
|
+
name
|
|
653
|
+
},
|
|
654
|
+
type: EVENTS.CHANGE
|
|
655
|
+
});
|
|
656
|
+
}, [name, control]);
|
|
657
|
+
const onBlur = React__default.default.useCallback(() => _registerProps.current.onBlur({
|
|
658
|
+
target: {
|
|
659
|
+
value: get(control._formValues, name),
|
|
660
|
+
name
|
|
661
|
+
},
|
|
662
|
+
type: EVENTS.BLUR
|
|
663
|
+
}), [name, control._formValues]);
|
|
664
|
+
const ref = React__default.default.useCallback((elm) => {
|
|
665
|
+
if (elm) {
|
|
666
|
+
_proxyRef.current = {
|
|
667
|
+
focus: () => isFunction(elm.focus) && elm.focus(),
|
|
668
|
+
select: () => isFunction(elm.select) && elm.select(),
|
|
669
|
+
setCustomValidity: (message) => isFunction(elm.setCustomValidity) && elm.setCustomValidity(message),
|
|
670
|
+
reportValidity: () => isFunction(elm.reportValidity) && elm.reportValidity()
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
const field2 = get(control._fields, name);
|
|
674
|
+
if (field2 && field2._f && elm) {
|
|
675
|
+
field2._f.ref = _proxyRef.current;
|
|
676
|
+
}
|
|
677
|
+
}, [control._fields, name]);
|
|
678
|
+
const field = React__default.default.useMemo(() => ({
|
|
679
|
+
name,
|
|
680
|
+
value,
|
|
681
|
+
...isBoolean(disabled) || formState.disabled ? { disabled: formState.disabled || disabled } : {},
|
|
682
|
+
onChange,
|
|
683
|
+
onBlur,
|
|
684
|
+
ref
|
|
685
|
+
}), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);
|
|
531
686
|
React__default.default.useEffect(() => {
|
|
532
687
|
const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
|
|
688
|
+
_registerProps.current = control.register(name, {
|
|
689
|
+
..._props.current.rules,
|
|
690
|
+
...isBoolean(_props.current.disabled) ? { disabled: _props.current.disabled } : {}
|
|
691
|
+
});
|
|
533
692
|
const updateMounted = (name2, value2) => {
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
|
|
693
|
+
const field2 = get(control._fields, name2);
|
|
694
|
+
if (field2 && field2._f) {
|
|
695
|
+
field2._f.mount = value2;
|
|
537
696
|
}
|
|
538
697
|
};
|
|
539
698
|
updateMounted(name, true);
|
|
540
699
|
if (_shouldUnregisterField) {
|
|
541
|
-
const value2 = cloneObject(get(control._options.defaultValues, name));
|
|
700
|
+
const value2 = cloneObject(get(shouldUnregister ? control._defaultValues : control._options.values || control._defaultValues, name, get(control._options.defaultValues, name, _props.current.defaultValue)));
|
|
542
701
|
set(control._defaultValues, name, value2);
|
|
543
702
|
if (isUndefined(get(control._formValues, name))) {
|
|
544
703
|
set(control._formValues, name, value2);
|
|
545
704
|
}
|
|
546
705
|
}
|
|
706
|
+
!isArrayField && control.register(name);
|
|
707
|
+
if (_proxyRef.current) {
|
|
708
|
+
const field2 = get(control._fields, name);
|
|
709
|
+
if (field2 && field2._f) {
|
|
710
|
+
field2._f.ref = _proxyRef.current;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
547
713
|
return () => {
|
|
548
714
|
(isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name) : updateMounted(name, false);
|
|
549
715
|
};
|
|
550
716
|
}, [name, control, isArrayField, shouldUnregister]);
|
|
551
717
|
React__default.default.useEffect(() => {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
name,
|
|
557
|
-
value: get(control._fields, name)._f.value
|
|
558
|
-
});
|
|
559
|
-
}
|
|
718
|
+
control._setDisabledField({
|
|
719
|
+
disabled,
|
|
720
|
+
name
|
|
721
|
+
});
|
|
560
722
|
}, [disabled, name, control]);
|
|
561
|
-
return {
|
|
562
|
-
field
|
|
563
|
-
name,
|
|
564
|
-
value,
|
|
565
|
-
...isBoolean(disabled) || isBoolean(formState.disabled) ? { disabled: formState.disabled || disabled } : {},
|
|
566
|
-
onChange: React__default.default.useCallback((event) => _registerProps.current.onChange({
|
|
567
|
-
target: {
|
|
568
|
-
value: getEventValue(event),
|
|
569
|
-
name
|
|
570
|
-
},
|
|
571
|
-
type: EVENTS.CHANGE
|
|
572
|
-
}), [name]),
|
|
573
|
-
onBlur: React__default.default.useCallback(() => _registerProps.current.onBlur({
|
|
574
|
-
target: {
|
|
575
|
-
value: get(control._formValues, name),
|
|
576
|
-
name
|
|
577
|
-
},
|
|
578
|
-
type: EVENTS.BLUR
|
|
579
|
-
}), [name, control]),
|
|
580
|
-
ref: (elm) => {
|
|
581
|
-
const field = get(control._fields, name);
|
|
582
|
-
if (field && elm) {
|
|
583
|
-
field._f.ref = {
|
|
584
|
-
focus: () => elm.focus(),
|
|
585
|
-
select: () => elm.select(),
|
|
586
|
-
setCustomValidity: (message) => elm.setCustomValidity(message),
|
|
587
|
-
reportValidity: () => elm.reportValidity()
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
},
|
|
723
|
+
return React__default.default.useMemo(() => ({
|
|
724
|
+
field,
|
|
592
725
|
formState,
|
|
593
|
-
fieldState
|
|
594
|
-
|
|
595
|
-
enumerable: true,
|
|
596
|
-
get: () => !!get(formState.errors, name)
|
|
597
|
-
},
|
|
598
|
-
isDirty: {
|
|
599
|
-
enumerable: true,
|
|
600
|
-
get: () => !!get(formState.dirtyFields, name)
|
|
601
|
-
},
|
|
602
|
-
isTouched: {
|
|
603
|
-
enumerable: true,
|
|
604
|
-
get: () => !!get(formState.touchedFields, name)
|
|
605
|
-
},
|
|
606
|
-
error: {
|
|
607
|
-
enumerable: true,
|
|
608
|
-
get: () => get(formState.errors, name)
|
|
609
|
-
}
|
|
610
|
-
})
|
|
611
|
-
};
|
|
726
|
+
fieldState
|
|
727
|
+
}), [field, formState, fieldState]);
|
|
612
728
|
}
|
|
613
729
|
const Controller = (props) => props.render(useController(props));
|
|
614
|
-
var appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria ? {
|
|
615
|
-
...errors[name],
|
|
616
|
-
types: {
|
|
617
|
-
...errors[name] && errors[name].types ? errors[name].types : {},
|
|
618
|
-
[type]: message || true
|
|
619
|
-
}
|
|
620
|
-
} : {};
|
|
621
730
|
var getValidationModes = (mode) => ({
|
|
622
731
|
isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,
|
|
623
732
|
isOnBlur: mode === VALIDATION_MODE.onBlur,
|
|
@@ -625,7 +734,17 @@ var getValidationModes = (mode) => ({
|
|
|
625
734
|
isOnAll: mode === VALIDATION_MODE.all,
|
|
626
735
|
isOnTouch: mode === VALIDATION_MODE.onTouched
|
|
627
736
|
});
|
|
628
|
-
var isWatched = (name, _names, isBlurEvent) =>
|
|
737
|
+
var isWatched = (name, _names, isBlurEvent) => {
|
|
738
|
+
if (isBlurEvent)
|
|
739
|
+
return false;
|
|
740
|
+
if (_names.watchAll || _names.watch.has(name))
|
|
741
|
+
return true;
|
|
742
|
+
for (const watchName of _names.watch) {
|
|
743
|
+
if (name.startsWith(watchName) && name.charAt(watchName.length) === ".")
|
|
744
|
+
return true;
|
|
745
|
+
}
|
|
746
|
+
return false;
|
|
747
|
+
};
|
|
629
748
|
const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
|
|
630
749
|
for (const key of fieldsNames || Object.keys(fields)) {
|
|
631
750
|
const field = get(fields, key);
|
|
@@ -633,26 +752,31 @@ const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
|
|
|
633
752
|
const { _f, ...currentField } = field;
|
|
634
753
|
if (_f) {
|
|
635
754
|
if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {
|
|
636
|
-
|
|
755
|
+
return true;
|
|
637
756
|
} else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {
|
|
638
|
-
|
|
757
|
+
return true;
|
|
639
758
|
} else {
|
|
640
|
-
iterateFieldsByAction(currentField, action)
|
|
759
|
+
if (iterateFieldsByAction(currentField, action)) {
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
641
762
|
}
|
|
642
763
|
} else if (isObject(currentField)) {
|
|
643
|
-
iterateFieldsByAction(currentField, action)
|
|
764
|
+
if (iterateFieldsByAction(currentField, action)) {
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
644
767
|
}
|
|
645
768
|
}
|
|
646
769
|
}
|
|
770
|
+
return;
|
|
647
771
|
};
|
|
648
772
|
var updateFieldArrayRootError = (errors, error, name) => {
|
|
649
|
-
const
|
|
650
|
-
|
|
773
|
+
const existingErrors = get(errors, name);
|
|
774
|
+
const fieldArrayErrors = Array.isArray(existingErrors) ? existingErrors : [];
|
|
775
|
+
set(fieldArrayErrors, ROOT_ERROR_TYPE, error[name]);
|
|
651
776
|
set(errors, name, fieldArrayErrors);
|
|
652
777
|
return errors;
|
|
653
778
|
};
|
|
654
|
-
var
|
|
655
|
-
var isFunction = (value) => typeof value === "function";
|
|
779
|
+
var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
|
|
656
780
|
var isHTMLElement = (value) => {
|
|
657
781
|
if (!isWeb) {
|
|
658
782
|
return false;
|
|
@@ -660,9 +784,15 @@ var isHTMLElement = (value) => {
|
|
|
660
784
|
const owner = value ? value.ownerDocument : 0;
|
|
661
785
|
return value instanceof (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement);
|
|
662
786
|
};
|
|
663
|
-
var isMessage = (value) => isString(value);
|
|
664
787
|
var isRadioInput = (element) => element.type === "radio";
|
|
665
788
|
var isRegex = (value) => value instanceof RegExp;
|
|
789
|
+
var appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria ? {
|
|
790
|
+
...errors[name],
|
|
791
|
+
types: {
|
|
792
|
+
...errors[name] && errors[name].types ? errors[name].types : {},
|
|
793
|
+
[type]: message || true
|
|
794
|
+
}
|
|
795
|
+
} : {};
|
|
666
796
|
const defaultResult = {
|
|
667
797
|
value: false,
|
|
668
798
|
isValid: false
|
|
@@ -690,10 +820,10 @@ var getRadioValue = (options) => Array.isArray(options) ? options.reduce((previo
|
|
|
690
820
|
value: option.value
|
|
691
821
|
} : previous, defaultReturn) : defaultReturn;
|
|
692
822
|
function getValidateError(result, ref, type = "validate") {
|
|
693
|
-
if (
|
|
823
|
+
if (isString(result) || Array.isArray(result) && result.every(isString) || isBoolean(result) && !result) {
|
|
694
824
|
return {
|
|
695
825
|
type,
|
|
696
|
-
message:
|
|
826
|
+
message: isString(result) ? result : "",
|
|
697
827
|
ref
|
|
698
828
|
};
|
|
699
829
|
}
|
|
@@ -702,16 +832,21 @@ var getValueAndMessage = (validationData) => isObject(validationData) && !isRege
|
|
|
702
832
|
value: validationData,
|
|
703
833
|
message: ""
|
|
704
834
|
};
|
|
705
|
-
var validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
|
|
706
|
-
const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount
|
|
835
|
+
var validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
|
|
836
|
+
const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount } = field._f;
|
|
707
837
|
const inputValue = get(formValues, name);
|
|
708
|
-
if (!mount ||
|
|
838
|
+
if (!mount || disabledFieldNames.has(name)) {
|
|
709
839
|
return {};
|
|
710
840
|
}
|
|
711
841
|
const inputRef = refs ? refs[0] : ref;
|
|
712
842
|
const setCustomValidity = (message) => {
|
|
713
843
|
if (shouldUseNativeValidation && inputRef.reportValidity) {
|
|
714
|
-
|
|
844
|
+
const validityMessage = isBoolean(message) ? "" : message || "";
|
|
845
|
+
if (refs) {
|
|
846
|
+
refs.forEach((ref2) => ref2.setCustomValidity(validityMessage));
|
|
847
|
+
} else {
|
|
848
|
+
inputRef.setCustomValidity(validityMessage);
|
|
849
|
+
}
|
|
715
850
|
inputRef.reportValidity();
|
|
716
851
|
}
|
|
717
852
|
};
|
|
@@ -731,7 +866,7 @@ var validateField = async (field, formValues, validateAllFieldCriteria, shouldUs
|
|
|
731
866
|
};
|
|
732
867
|
};
|
|
733
868
|
if (isFieldArray ? !Array.isArray(inputValue) || !inputValue.length : required && (!isRadioOrCheckbox2 && (isEmpty || isNullOrUndefined(inputValue)) || isBoolean(inputValue) && !inputValue || isCheckBox && !getCheckboxValue(refs).isValid || isRadio && !getRadioValue(refs).isValid)) {
|
|
734
|
-
const { value, message } =
|
|
869
|
+
const { value, message } = isString(required) ? { value: !!required, message: required } : getValueAndMessage(required);
|
|
735
870
|
if (value) {
|
|
736
871
|
error[name] = {
|
|
737
872
|
type: INPUT_VALIDATION_RULES.required,
|
|
@@ -852,11 +987,18 @@ var validateField = async (field, formValues, validateAllFieldCriteria, shouldUs
|
|
|
852
987
|
setCustomValidity(true);
|
|
853
988
|
return error;
|
|
854
989
|
};
|
|
990
|
+
var convertToArrayPayload = (value) => Array.isArray(value) ? value : [value];
|
|
991
|
+
var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
|
|
855
992
|
function baseGet(object, updatePath) {
|
|
856
993
|
const length = updatePath.slice(0, -1).length;
|
|
857
994
|
let index = 0;
|
|
858
995
|
while (index < length) {
|
|
859
|
-
|
|
996
|
+
if (isNullOrUndefined(object)) {
|
|
997
|
+
object = void 0;
|
|
998
|
+
break;
|
|
999
|
+
}
|
|
1000
|
+
object = object[updatePath[index]];
|
|
1001
|
+
index++;
|
|
860
1002
|
}
|
|
861
1003
|
return object;
|
|
862
1004
|
}
|
|
@@ -869,7 +1011,14 @@ function isEmptyArray(obj) {
|
|
|
869
1011
|
return true;
|
|
870
1012
|
}
|
|
871
1013
|
function unset(object, path) {
|
|
1014
|
+
if (isString(path) && Object.prototype.hasOwnProperty.call(object, path)) {
|
|
1015
|
+
delete object[path];
|
|
1016
|
+
return object;
|
|
1017
|
+
}
|
|
872
1018
|
const paths = Array.isArray(path) ? path : isKey(path) ? [path] : stringToPath(path);
|
|
1019
|
+
if (paths.some((segment) => PROTOTYPE_KEYWORDS.includes(String(segment)))) {
|
|
1020
|
+
return object;
|
|
1021
|
+
}
|
|
873
1022
|
const childObject = paths.length === 1 ? object : baseGet(object, paths);
|
|
874
1023
|
const index = paths.length - 1;
|
|
875
1024
|
const key = paths[index];
|
|
@@ -881,6 +1030,22 @@ function unset(object, path) {
|
|
|
881
1030
|
}
|
|
882
1031
|
return object;
|
|
883
1032
|
}
|
|
1033
|
+
const flatten = (obj) => {
|
|
1034
|
+
const output = {};
|
|
1035
|
+
for (const key of Object.keys(obj)) {
|
|
1036
|
+
if (isObjectType(obj[key]) && obj[key] !== null && !isDateObject(obj[key])) {
|
|
1037
|
+
const nested = flatten(obj[key]);
|
|
1038
|
+
for (const nestedKey of Object.keys(nested)) {
|
|
1039
|
+
output[`${key}.${nestedKey}`] = nested[nestedKey];
|
|
1040
|
+
}
|
|
1041
|
+
} else {
|
|
1042
|
+
output[key] = obj[key];
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
return output;
|
|
1046
|
+
};
|
|
1047
|
+
const HookFormContext = React__default.default.createContext(null);
|
|
1048
|
+
HookFormContext.displayName = "HookFormContext";
|
|
884
1049
|
var createSubject = () => {
|
|
885
1050
|
let _observers = [];
|
|
886
1051
|
const next = (value) => {
|
|
@@ -908,32 +1073,23 @@ var createSubject = () => {
|
|
|
908
1073
|
unsubscribe
|
|
909
1074
|
};
|
|
910
1075
|
};
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
for (const key of keys1) {
|
|
925
|
-
const val1 = object1[key];
|
|
926
|
-
if (!keys2.includes(key)) {
|
|
927
|
-
return false;
|
|
928
|
-
}
|
|
929
|
-
if (key !== "ref") {
|
|
930
|
-
const val2 = object2[key];
|
|
931
|
-
if (isDateObject(val1) && isDateObject(val2) || isObject(val1) && isObject(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual(val1, val2) : val1 !== val2) {
|
|
932
|
-
return false;
|
|
1076
|
+
function extractFormValues(fieldsState, formValues) {
|
|
1077
|
+
const values = {};
|
|
1078
|
+
for (const key in fieldsState) {
|
|
1079
|
+
if (fieldsState.hasOwnProperty(key)) {
|
|
1080
|
+
const fieldState = fieldsState[key];
|
|
1081
|
+
const fieldValue = formValues[key];
|
|
1082
|
+
if (fieldState && isObject(fieldState) && fieldValue) {
|
|
1083
|
+
const nestedFieldsState = extractFormValues(fieldState, fieldValue);
|
|
1084
|
+
if (isObject(nestedFieldsState)) {
|
|
1085
|
+
values[key] = nestedFieldsState;
|
|
1086
|
+
}
|
|
1087
|
+
} else if (fieldsState[key]) {
|
|
1088
|
+
values[key] = fieldValue;
|
|
933
1089
|
}
|
|
934
1090
|
}
|
|
935
1091
|
}
|
|
936
|
-
return
|
|
1092
|
+
return values;
|
|
937
1093
|
}
|
|
938
1094
|
var isMultipleSelect = (element) => element.type === `select-multiple`;
|
|
939
1095
|
var isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);
|
|
@@ -946,44 +1102,65 @@ var objectHasFunction = (data) => {
|
|
|
946
1102
|
}
|
|
947
1103
|
return false;
|
|
948
1104
|
};
|
|
949
|
-
function
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1105
|
+
function isTraversable(value) {
|
|
1106
|
+
return Array.isArray(value) || isObject(value) && !objectHasFunction(value);
|
|
1107
|
+
}
|
|
1108
|
+
function isRegisteredLeaf(fieldRef) {
|
|
1109
|
+
return !!(fieldRef && "_f" in fieldRef);
|
|
1110
|
+
}
|
|
1111
|
+
function isEmptyDirtyContainer(value) {
|
|
1112
|
+
return Array.isArray(value) ? !value.some((item) => !isUndefined(item)) : !Object.keys(value).length;
|
|
1113
|
+
}
|
|
1114
|
+
function clearDirtyField(container, key) {
|
|
1115
|
+
if (Array.isArray(container)) {
|
|
1116
|
+
container[key] = void 0;
|
|
1117
|
+
} else {
|
|
1118
|
+
delete container[key];
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
function markFieldsDirty(data, fields = {}, fieldRefs) {
|
|
1122
|
+
for (const key in data) {
|
|
1123
|
+
const value = data[key];
|
|
1124
|
+
const fieldRef = fieldRefs && fieldRefs[key];
|
|
1125
|
+
if (isTraversable(value) && (!Array.isArray(value) || !isRegisteredLeaf(fieldRef))) {
|
|
1126
|
+
fields[key] = Array.isArray(value) ? [] : {};
|
|
1127
|
+
markFieldsDirty(value, fields[key], fieldRef);
|
|
1128
|
+
if (isEmptyDirtyContainer(fields[key])) {
|
|
1129
|
+
clearDirtyField(fields, key);
|
|
958
1130
|
}
|
|
1131
|
+
} else if (!isUndefined(value)) {
|
|
1132
|
+
fields[key] = true;
|
|
959
1133
|
}
|
|
960
1134
|
}
|
|
961
1135
|
return fields;
|
|
962
1136
|
}
|
|
963
|
-
function
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
}
|
|
1137
|
+
function getDirtyFields(data, formValues, dirtyFieldsFromValues, fieldRefs) {
|
|
1138
|
+
if (!dirtyFieldsFromValues) {
|
|
1139
|
+
dirtyFieldsFromValues = markFieldsDirty(formValues, {}, fieldRefs);
|
|
1140
|
+
}
|
|
1141
|
+
for (const key in data) {
|
|
1142
|
+
const value = data[key];
|
|
1143
|
+
const fieldRef = fieldRefs && fieldRefs[key];
|
|
1144
|
+
if (isTraversable(value) && (!Array.isArray(value) || !isRegisteredLeaf(fieldRef))) {
|
|
1145
|
+
if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
|
|
1146
|
+
dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {}, fieldRef);
|
|
973
1147
|
} else {
|
|
974
|
-
|
|
1148
|
+
getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key], fieldRef);
|
|
1149
|
+
}
|
|
1150
|
+
if (isEmptyDirtyContainer(dirtyFieldsFromValues[key])) {
|
|
1151
|
+
clearDirtyField(dirtyFieldsFromValues, key);
|
|
975
1152
|
}
|
|
1153
|
+
} else if (deepEqual(value, formValues[key])) {
|
|
1154
|
+
clearDirtyField(dirtyFieldsFromValues, key);
|
|
1155
|
+
} else {
|
|
1156
|
+
dirtyFieldsFromValues[key] = true;
|
|
976
1157
|
}
|
|
977
1158
|
}
|
|
978
1159
|
return dirtyFieldsFromValues;
|
|
979
1160
|
}
|
|
980
|
-
var getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));
|
|
981
1161
|
var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value) ? value : valueAsNumber ? value === "" ? NaN : value ? +value : value : valueAsDate && isString(value) ? new Date(value) : setValueAs ? setValueAs(value) : value;
|
|
982
1162
|
function getFieldValue(_f) {
|
|
983
1163
|
const ref = _f.ref;
|
|
984
|
-
if (_f.refs ? _f.refs.every((ref2) => ref2.disabled) : ref.disabled) {
|
|
985
|
-
return;
|
|
986
|
-
}
|
|
987
1164
|
if (isFileInput(ref)) {
|
|
988
1165
|
return ref.files;
|
|
989
1166
|
}
|
|
@@ -1012,6 +1189,22 @@ var getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeVal
|
|
|
1012
1189
|
};
|
|
1013
1190
|
};
|
|
1014
1191
|
var getRuleValue = (rule) => isUndefined(rule) ? rule : isRegex(rule) ? rule.source : isObject(rule) ? isRegex(rule.value) ? rule.value.source : rule.value : rule;
|
|
1192
|
+
const ASYNC_FUNCTION = "AsyncFunction";
|
|
1193
|
+
var hasPromiseValidation = (fieldReference) => {
|
|
1194
|
+
if (!fieldReference || !fieldReference.validate)
|
|
1195
|
+
return false;
|
|
1196
|
+
if (isFunction(fieldReference.validate)) {
|
|
1197
|
+
return fieldReference.validate.constructor.name === ASYNC_FUNCTION;
|
|
1198
|
+
}
|
|
1199
|
+
if (isObject(fieldReference.validate)) {
|
|
1200
|
+
for (const key in fieldReference.validate) {
|
|
1201
|
+
if (fieldReference.validate[key].constructor.name === ASYNC_FUNCTION) {
|
|
1202
|
+
return true;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
return false;
|
|
1207
|
+
};
|
|
1015
1208
|
var hasValidation = (options) => options.mount && (options.required || options.min || options.max || options.maxLength || options.minLength || options.pattern || options.validate);
|
|
1016
1209
|
function schemaErrorLookup(errors, _fields, name) {
|
|
1017
1210
|
const error = get(errors, name);
|
|
@@ -1035,12 +1228,25 @@ function schemaErrorLookup(errors, _fields, name) {
|
|
|
1035
1228
|
error: foundError
|
|
1036
1229
|
};
|
|
1037
1230
|
}
|
|
1231
|
+
if (foundError && foundError.root && foundError.root.type) {
|
|
1232
|
+
return {
|
|
1233
|
+
name: `${fieldName}.root`,
|
|
1234
|
+
error: foundError.root
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1038
1237
|
names.pop();
|
|
1039
1238
|
}
|
|
1040
1239
|
return {
|
|
1041
1240
|
name
|
|
1042
1241
|
};
|
|
1043
1242
|
}
|
|
1243
|
+
var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
|
|
1244
|
+
updateFormState(formStateData);
|
|
1245
|
+
const { name, ...formState } = formStateData;
|
|
1246
|
+
const keys = Object.keys(formState);
|
|
1247
|
+
return !keys.length || isRoot && keys.length >= Object.keys(_proxyFormState).length || keys.find((key) => _proxyFormState[key] === (!isRoot || VALIDATION_MODE.all));
|
|
1248
|
+
};
|
|
1249
|
+
var shouldSubscribeByName = (name, signalName, exact) => !name || !signalName || name === signalName || convertToArrayPayload(name).some((currentName) => currentName && (exact ? currentName === signalName || currentName.startsWith(signalName + ".") : currentName.startsWith(signalName) || signalName.startsWith(currentName)));
|
|
1044
1250
|
var skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {
|
|
1045
1251
|
if (mode.isOnAll) {
|
|
1046
1252
|
return false;
|
|
@@ -1059,24 +1265,38 @@ const defaultOptions = {
|
|
|
1059
1265
|
reValidateMode: VALIDATION_MODE.onChange,
|
|
1060
1266
|
shouldFocusError: true
|
|
1061
1267
|
};
|
|
1062
|
-
|
|
1268
|
+
const FORM_ERROR_TYPE = "form";
|
|
1269
|
+
const updateDirtyFields = (dirtyFields, nextDirtyFields) => {
|
|
1270
|
+
for (const key in dirtyFields) {
|
|
1271
|
+
if (!(key in nextDirtyFields)) {
|
|
1272
|
+
delete dirtyFields[key];
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
Object.assign(dirtyFields, nextDirtyFields);
|
|
1276
|
+
};
|
|
1277
|
+
const DEFAULT_FORM_STATE = {
|
|
1278
|
+
submitCount: 0,
|
|
1279
|
+
isDirty: false,
|
|
1280
|
+
isReady: false,
|
|
1281
|
+
isValidating: false,
|
|
1282
|
+
isSubmitted: false,
|
|
1283
|
+
isSubmitting: false,
|
|
1284
|
+
isSubmitSuccessful: false,
|
|
1285
|
+
isValid: false,
|
|
1286
|
+
touchedFields: {},
|
|
1287
|
+
dirtyFields: {},
|
|
1288
|
+
validatingFields: {}
|
|
1289
|
+
};
|
|
1290
|
+
function createFormControl(props = {}) {
|
|
1063
1291
|
let _options = {
|
|
1064
1292
|
...defaultOptions,
|
|
1065
1293
|
...props
|
|
1066
1294
|
};
|
|
1067
1295
|
let _formState = {
|
|
1068
|
-
|
|
1069
|
-
isDirty: false,
|
|
1296
|
+
...cloneObject(DEFAULT_FORM_STATE),
|
|
1070
1297
|
isLoading: isFunction(_options.defaultValues),
|
|
1071
|
-
isValidating: false,
|
|
1072
|
-
isSubmitted: false,
|
|
1073
|
-
isSubmitting: false,
|
|
1074
|
-
isSubmitSuccessful: false,
|
|
1075
|
-
isValid: false,
|
|
1076
|
-
touchedFields: {},
|
|
1077
|
-
dirtyFields: {},
|
|
1078
1298
|
errors: _options.errors || {},
|
|
1079
|
-
disabled: false
|
|
1299
|
+
disabled: _options.disabled || false
|
|
1080
1300
|
};
|
|
1081
1301
|
let _fields = {};
|
|
1082
1302
|
let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values) ? cloneObject(_options.defaultValues || _options.values) || {} : {};
|
|
@@ -1084,52 +1304,89 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1084
1304
|
let _state = {
|
|
1085
1305
|
action: false,
|
|
1086
1306
|
mount: false,
|
|
1087
|
-
watch: false
|
|
1307
|
+
watch: false,
|
|
1308
|
+
keepIsValid: false
|
|
1088
1309
|
};
|
|
1089
1310
|
let _names = {
|
|
1090
1311
|
mount: /* @__PURE__ */ new Set(),
|
|
1312
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
1091
1313
|
unMount: /* @__PURE__ */ new Set(),
|
|
1092
1314
|
array: /* @__PURE__ */ new Set(),
|
|
1093
|
-
watch: /* @__PURE__ */ new Set()
|
|
1315
|
+
watch: /* @__PURE__ */ new Set(),
|
|
1316
|
+
registerName: /* @__PURE__ */ new Set()
|
|
1094
1317
|
};
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1318
|
+
const delayErrorCallbacks = {};
|
|
1319
|
+
const timers = {};
|
|
1320
|
+
let _valuesSubscriberCount = 0;
|
|
1321
|
+
let _validationModeBeforeSubmit = getValidationModes(_options.mode);
|
|
1322
|
+
let _validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
|
|
1323
|
+
const defaultProxyFormState = {
|
|
1098
1324
|
isDirty: false,
|
|
1099
1325
|
dirtyFields: false,
|
|
1326
|
+
validatingFields: false,
|
|
1100
1327
|
touchedFields: false,
|
|
1101
1328
|
isValidating: false,
|
|
1102
1329
|
isValid: false,
|
|
1103
1330
|
errors: false
|
|
1104
1331
|
};
|
|
1332
|
+
const _proxyFormState = {
|
|
1333
|
+
...defaultProxyFormState
|
|
1334
|
+
};
|
|
1335
|
+
let _proxySubscribeFormState = {
|
|
1336
|
+
..._proxyFormState
|
|
1337
|
+
};
|
|
1105
1338
|
const _subjects = {
|
|
1106
|
-
values: createSubject(),
|
|
1107
1339
|
array: createSubject(),
|
|
1108
1340
|
state: createSubject()
|
|
1109
1341
|
};
|
|
1110
|
-
|
|
1111
|
-
const validationModeBeforeSubmit = getValidationModes(_options.mode);
|
|
1112
|
-
const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
|
|
1342
|
+
let _setValidCallId = 0;
|
|
1113
1343
|
const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;
|
|
1114
|
-
const debounce = (callback) => (wait) => {
|
|
1115
|
-
clearTimeout(
|
|
1116
|
-
|
|
1117
|
-
};
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1121
|
-
|
|
1344
|
+
const debounce = (name, callback) => (wait) => {
|
|
1345
|
+
clearTimeout(timers[name]);
|
|
1346
|
+
timers[name] = setTimeout(callback, wait);
|
|
1347
|
+
};
|
|
1348
|
+
const _setValid = async (shouldUpdateValid) => {
|
|
1349
|
+
if (_state.keepIsValid) {
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
if (!_options.disabled && (_proxyFormState.isValid || _proxySubscribeFormState.isValid || shouldUpdateValid)) {
|
|
1353
|
+
const callId = ++_setValidCallId;
|
|
1354
|
+
let isValid;
|
|
1355
|
+
if (_options.resolver) {
|
|
1356
|
+
isValid = isEmptyObject((await _runSchema()).errors);
|
|
1357
|
+
callId === _setValidCallId && _updateIsValidating();
|
|
1358
|
+
} else {
|
|
1359
|
+
isValid = await executeBuiltInValidation({
|
|
1360
|
+
fields: _fields,
|
|
1361
|
+
onlyCheckValid: true,
|
|
1362
|
+
eventType: EVENTS.VALID
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
if (callId === _setValidCallId && isValid !== _formState.isValid) {
|
|
1122
1366
|
_subjects.state.next({
|
|
1123
1367
|
isValid
|
|
1124
1368
|
});
|
|
1125
1369
|
}
|
|
1126
1370
|
}
|
|
1127
1371
|
};
|
|
1128
|
-
const _updateIsValidating = (
|
|
1129
|
-
isValidating
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1372
|
+
const _updateIsValidating = (names, isValidating) => {
|
|
1373
|
+
if (!_options.disabled && (_proxyFormState.isValidating || _proxyFormState.validatingFields || _proxySubscribeFormState.isValidating || _proxySubscribeFormState.validatingFields)) {
|
|
1374
|
+
(names || Array.from(_names.mount)).forEach((name) => {
|
|
1375
|
+
if (name) {
|
|
1376
|
+
isValidating ? set(_formState.validatingFields, name, isValidating) : unset(_formState.validatingFields, name);
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
_subjects.state.next({
|
|
1380
|
+
validatingFields: _formState.validatingFields,
|
|
1381
|
+
isValidating: !isEmptyObject(_formState.validatingFields)
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
};
|
|
1385
|
+
const _updateDirtyFields = () => {
|
|
1386
|
+
_formState.dirtyFields = getDirtyFields(_defaultValues, _formValues, void 0, _fields);
|
|
1387
|
+
};
|
|
1388
|
+
const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
|
|
1389
|
+
if (args && method && !_options.disabled) {
|
|
1133
1390
|
_state.action = true;
|
|
1134
1391
|
if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {
|
|
1135
1392
|
const fieldValues = method(get(_fields, name), args.argA, args.argB);
|
|
@@ -1140,12 +1397,12 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1140
1397
|
shouldSetValues && set(_formState.errors, name, errors);
|
|
1141
1398
|
unsetEmptyArray(_formState.errors, name);
|
|
1142
1399
|
}
|
|
1143
|
-
if (_proxyFormState.touchedFields && shouldUpdateFieldsAndState && Array.isArray(get(_formState.touchedFields, name))) {
|
|
1400
|
+
if ((_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && shouldUpdateFieldsAndState && Array.isArray(get(_formState.touchedFields, name))) {
|
|
1144
1401
|
const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);
|
|
1145
1402
|
shouldSetValues && set(_formState.touchedFields, name, touchedFields);
|
|
1146
1403
|
}
|
|
1147
|
-
if (_proxyFormState.dirtyFields) {
|
|
1148
|
-
|
|
1404
|
+
if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {
|
|
1405
|
+
_updateDirtyFields();
|
|
1149
1406
|
}
|
|
1150
1407
|
_subjects.state.next({
|
|
1151
1408
|
name,
|
|
@@ -1160,6 +1417,7 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1160
1417
|
};
|
|
1161
1418
|
const updateErrors = (name, error) => {
|
|
1162
1419
|
set(_formState.errors, name, error);
|
|
1420
|
+
_formState.errors = { ..._formState.errors };
|
|
1163
1421
|
_subjects.state.next({
|
|
1164
1422
|
errors: _formState.errors
|
|
1165
1423
|
});
|
|
@@ -1171,12 +1429,42 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1171
1429
|
isValid: false
|
|
1172
1430
|
});
|
|
1173
1431
|
};
|
|
1432
|
+
const hasExplicitNullIntermediate = (name) => {
|
|
1433
|
+
const segments = isKey(name) ? [name] : stringToPath(name);
|
|
1434
|
+
let formValues = _formValues;
|
|
1435
|
+
let defaultValues = _defaultValues;
|
|
1436
|
+
for (let i = 0; i < segments.length - 1; i++) {
|
|
1437
|
+
const key = segments[i];
|
|
1438
|
+
formValues = isNullOrUndefined(formValues) ? formValues : formValues[key];
|
|
1439
|
+
defaultValues = isNullOrUndefined(defaultValues) ? defaultValues : defaultValues[key];
|
|
1440
|
+
if (formValues === null && defaultValues !== null) {
|
|
1441
|
+
return true;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
return false;
|
|
1445
|
+
};
|
|
1174
1446
|
const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {
|
|
1175
1447
|
const field = get(_fields, name);
|
|
1176
1448
|
if (field) {
|
|
1449
|
+
if (hasExplicitNullIntermediate(name)) {
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
const wasUnsetInFormValues = isUndefined(get(_formValues, name));
|
|
1177
1453
|
const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
|
|
1178
1454
|
isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
|
|
1179
|
-
_state.mount &&
|
|
1455
|
+
if (_state.mount && !_state.action) {
|
|
1456
|
+
_setValid();
|
|
1457
|
+
if (wasUnsetInFormValues && _formState.isDirty && (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty)) {
|
|
1458
|
+
const isDirty = _getDirty();
|
|
1459
|
+
if (!isDirty) {
|
|
1460
|
+
_formState.isDirty = false;
|
|
1461
|
+
_subjects.state.next({ ..._formState });
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
if (props.shouldUnregister && wasUnsetInFormValues && !isUndefined(get(_formValues, name)) && isWatched(name, _names)) {
|
|
1465
|
+
_state.watch = true;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1180
1468
|
}
|
|
1181
1469
|
};
|
|
1182
1470
|
const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
|
|
@@ -1185,40 +1473,46 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1185
1473
|
const output = {
|
|
1186
1474
|
name
|
|
1187
1475
|
};
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1476
|
+
if (!_options.disabled || shouldDirty === true) {
|
|
1477
|
+
if (!isBlurEvent || shouldDirty) {
|
|
1478
|
+
const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);
|
|
1479
|
+
if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {
|
|
1480
|
+
isPreviousDirty = _formState.isDirty;
|
|
1481
|
+
_formState.isDirty = output.isDirty = !isCurrentFieldPristine || _getDirty();
|
|
1482
|
+
shouldUpdateField = isPreviousDirty !== output.isDirty;
|
|
1483
|
+
}
|
|
1484
|
+
isPreviousDirty = !!get(_formState.dirtyFields, name);
|
|
1485
|
+
if (isCurrentFieldPristine !== _formState.isDirty) {
|
|
1486
|
+
updateDirtyFields(_formState.dirtyFields, getDirtyFields(_defaultValues, _formValues, void 0, _fields));
|
|
1487
|
+
} else {
|
|
1488
|
+
isCurrentFieldPristine ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true);
|
|
1489
|
+
}
|
|
1490
|
+
output.dirtyFields = _formState.dirtyFields;
|
|
1491
|
+
shouldUpdateField = shouldUpdateField || (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) && isPreviousDirty !== !isCurrentFieldPristine;
|
|
1492
|
+
}
|
|
1493
|
+
if (isBlurEvent) {
|
|
1494
|
+
const isPreviousFieldTouched = get(_formState.touchedFields, name);
|
|
1495
|
+
if (!isPreviousFieldTouched) {
|
|
1496
|
+
set(_formState.touchedFields, name, isBlurEvent);
|
|
1497
|
+
output.touchedFields = _formState.touchedFields;
|
|
1498
|
+
shouldUpdateField = shouldUpdateField || (_proxyFormState.touchedFields || _proxySubscribeFormState.touchedFields) && isPreviousFieldTouched !== isBlurEvent;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
shouldUpdateField && shouldRender && _subjects.state.next(output);
|
|
1502
|
+
}
|
|
1210
1503
|
return shouldUpdateField ? output : {};
|
|
1211
1504
|
};
|
|
1212
1505
|
const shouldRenderByError = (name, isValid, error, fieldState) => {
|
|
1213
1506
|
const previousFieldError = get(_formState.errors, name);
|
|
1214
|
-
const shouldUpdateValid = _proxyFormState.isValid && isBoolean(isValid) && _formState.isValid !== isValid;
|
|
1215
|
-
if (
|
|
1216
|
-
|
|
1217
|
-
|
|
1507
|
+
const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isBoolean(isValid) && _formState.isValid !== isValid;
|
|
1508
|
+
if (_options.delayError && error) {
|
|
1509
|
+
delayErrorCallbacks[name] = debounce(name, () => updateErrors(name, error));
|
|
1510
|
+
delayErrorCallbacks[name](_options.delayError);
|
|
1218
1511
|
} else {
|
|
1219
|
-
clearTimeout(
|
|
1220
|
-
|
|
1512
|
+
clearTimeout(timers[name]);
|
|
1513
|
+
delete delayErrorCallbacks[name];
|
|
1221
1514
|
error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
|
|
1515
|
+
_formState.errors = { ..._formState.errors };
|
|
1222
1516
|
}
|
|
1223
1517
|
if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
|
|
1224
1518
|
const updatedFormState = {
|
|
@@ -1233,40 +1527,105 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1233
1527
|
};
|
|
1234
1528
|
_subjects.state.next(updatedFormState);
|
|
1235
1529
|
}
|
|
1236
|
-
_updateIsValidating(false);
|
|
1237
1530
|
};
|
|
1238
|
-
const
|
|
1531
|
+
const _runSchema = async (name) => {
|
|
1532
|
+
_updateIsValidating(name, true);
|
|
1533
|
+
return await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));
|
|
1534
|
+
};
|
|
1239
1535
|
const executeSchemaAndUpdateState = async (names) => {
|
|
1240
|
-
const { errors } = await
|
|
1536
|
+
const { errors } = await _runSchema(names);
|
|
1537
|
+
_updateIsValidating(names);
|
|
1241
1538
|
if (names) {
|
|
1242
1539
|
for (const name of names) {
|
|
1243
1540
|
const error = get(errors, name);
|
|
1244
|
-
error ? set(_formState.errors, name, error) : unset(_formState.errors, name);
|
|
1541
|
+
error ? _names.array.has(name) && isObject(error) && !Object.keys(error).some((key) => !Number.isNaN(Number(key))) ? updateFieldArrayRootError(_formState.errors, { [name]: error }, name) : set(_formState.errors, name, error) : unset(_formState.errors, name);
|
|
1245
1542
|
}
|
|
1543
|
+
_formState.errors = { ..._formState.errors };
|
|
1246
1544
|
} else {
|
|
1247
1545
|
_formState.errors = errors;
|
|
1248
1546
|
}
|
|
1249
1547
|
return errors;
|
|
1250
1548
|
};
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1549
|
+
const validateForm = async ({ name, eventType }) => {
|
|
1550
|
+
if (props.validate) {
|
|
1551
|
+
const result = await props.validate({
|
|
1552
|
+
formValues: _formValues,
|
|
1553
|
+
formState: _formState,
|
|
1554
|
+
name,
|
|
1555
|
+
eventType
|
|
1556
|
+
});
|
|
1557
|
+
if (isObject(result)) {
|
|
1558
|
+
for (const key in result) {
|
|
1559
|
+
const error = result[key];
|
|
1560
|
+
if (error) {
|
|
1561
|
+
setError(`${FORM_ERROR_TYPE}.${key}`, {
|
|
1562
|
+
message: isString(error.message) ? error.message : "",
|
|
1563
|
+
type: error.type || INPUT_VALIDATION_RULES.validate
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
} else if (isString(result) || !result) {
|
|
1568
|
+
setError(FORM_ERROR_TYPE, {
|
|
1569
|
+
message: result || "",
|
|
1570
|
+
type: INPUT_VALIDATION_RULES.validate
|
|
1571
|
+
});
|
|
1572
|
+
} else {
|
|
1573
|
+
clearErrors(FORM_ERROR_TYPE);
|
|
1574
|
+
}
|
|
1575
|
+
return result;
|
|
1576
|
+
}
|
|
1577
|
+
return true;
|
|
1578
|
+
};
|
|
1579
|
+
const executeBuiltInValidation = async ({ fields, onlyCheckValid, name, eventType, context = {
|
|
1580
|
+
valid: true,
|
|
1581
|
+
runRootValidation: false
|
|
1582
|
+
} }) => {
|
|
1583
|
+
if (props.validate) {
|
|
1584
|
+
context.runRootValidation = true;
|
|
1585
|
+
const result = await validateForm({
|
|
1586
|
+
name,
|
|
1587
|
+
eventType
|
|
1588
|
+
});
|
|
1589
|
+
if (!result) {
|
|
1590
|
+
context.valid = false;
|
|
1591
|
+
if (onlyCheckValid) {
|
|
1592
|
+
return context.valid;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
for (const name2 in fields) {
|
|
1597
|
+
const field = fields[name2];
|
|
1256
1598
|
if (field) {
|
|
1257
1599
|
const { _f, ...fieldValue } = field;
|
|
1258
1600
|
if (_f) {
|
|
1259
1601
|
const isFieldArrayRoot = _names.array.has(_f.name);
|
|
1260
|
-
const
|
|
1602
|
+
const isPromiseFunction = field._f && hasPromiseValidation(field._f);
|
|
1603
|
+
const shouldTrackIsValidatingState = _proxyFormState.validatingFields || _proxyFormState.isValidating || _proxySubscribeFormState.validatingFields || _proxySubscribeFormState.isValidating;
|
|
1604
|
+
if (isPromiseFunction && shouldTrackIsValidatingState) {
|
|
1605
|
+
_updateIsValidating([_f.name], true);
|
|
1606
|
+
}
|
|
1607
|
+
const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !onlyCheckValid, isFieldArrayRoot);
|
|
1608
|
+
if (isPromiseFunction && shouldTrackIsValidatingState) {
|
|
1609
|
+
_updateIsValidating([_f.name]);
|
|
1610
|
+
}
|
|
1261
1611
|
if (fieldError[_f.name]) {
|
|
1262
1612
|
context.valid = false;
|
|
1263
|
-
if (
|
|
1613
|
+
if (onlyCheckValid) {
|
|
1264
1614
|
break;
|
|
1265
1615
|
}
|
|
1266
1616
|
}
|
|
1267
|
-
!
|
|
1617
|
+
!onlyCheckValid && (get(fieldError, _f.name) ? isFieldArrayRoot ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name) : set(_formState.errors, _f.name, fieldError[_f.name]) : unset(_formState.errors, _f.name));
|
|
1618
|
+
if (props.shouldUseNativeValidation && fieldError[_f.name]) {
|
|
1619
|
+
break;
|
|
1620
|
+
}
|
|
1268
1621
|
}
|
|
1269
|
-
fieldValue && await executeBuiltInValidation(
|
|
1622
|
+
!isEmptyObject(fieldValue) && await executeBuiltInValidation({
|
|
1623
|
+
context,
|
|
1624
|
+
onlyCheckValid,
|
|
1625
|
+
fields: fieldValue,
|
|
1626
|
+
name: name2,
|
|
1627
|
+
eventType
|
|
1628
|
+
});
|
|
1270
1629
|
}
|
|
1271
1630
|
}
|
|
1272
1631
|
return context.valid;
|
|
@@ -1278,12 +1637,12 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1278
1637
|
}
|
|
1279
1638
|
_names.unMount = /* @__PURE__ */ new Set();
|
|
1280
1639
|
};
|
|
1281
|
-
const _getDirty = (name, data) => (name && data && set(_formValues, name, data), !deepEqual(
|
|
1640
|
+
const _getDirty = (name, data) => (name && data && set(_formValues, name, data), !deepEqual(_state.mount ? _formValues : _defaultValues, _defaultValues));
|
|
1282
1641
|
const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
|
|
1283
1642
|
..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names) ? { [names]: defaultValue } : defaultValue
|
|
1284
1643
|
}, isGlobal, defaultValue);
|
|
1285
|
-
const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name,
|
|
1286
|
-
const setFieldValue = (name, value, options = {}) => {
|
|
1644
|
+
const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));
|
|
1645
|
+
const setFieldValue = (name, value, options = {}, skipClone = false, skipRender = false) => {
|
|
1287
1646
|
const field = get(_fields, name);
|
|
1288
1647
|
let fieldValue = value;
|
|
1289
1648
|
if (field) {
|
|
@@ -1295,7 +1654,15 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1295
1654
|
[...fieldReference.ref.options].forEach((optionRef) => optionRef.selected = fieldValue.includes(optionRef.value));
|
|
1296
1655
|
} else if (fieldReference.refs) {
|
|
1297
1656
|
if (isCheckBoxInput(fieldReference.ref)) {
|
|
1298
|
-
fieldReference.refs.
|
|
1657
|
+
fieldReference.refs.forEach((checkboxRef) => {
|
|
1658
|
+
if (!checkboxRef.defaultChecked || !checkboxRef.disabled) {
|
|
1659
|
+
if (Array.isArray(fieldValue)) {
|
|
1660
|
+
checkboxRef.checked = !!fieldValue.find((data) => data === checkboxRef.value);
|
|
1661
|
+
} else {
|
|
1662
|
+
checkboxRef.checked = fieldValue === checkboxRef.value || !!fieldValue;
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1299
1666
|
} else {
|
|
1300
1667
|
fieldReference.refs.forEach((radioRef) => radioRef.checked = radioRef.value === fieldValue);
|
|
1301
1668
|
}
|
|
@@ -1303,112 +1670,184 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1303
1670
|
fieldReference.ref.value = "";
|
|
1304
1671
|
} else {
|
|
1305
1672
|
fieldReference.ref.value = fieldValue;
|
|
1306
|
-
if (!fieldReference.ref.type) {
|
|
1307
|
-
_subjects.
|
|
1673
|
+
if (!fieldReference.ref.type && !skipRender) {
|
|
1674
|
+
_subjects.state.next({
|
|
1308
1675
|
name,
|
|
1309
|
-
values:
|
|
1676
|
+
values: skipClone ? _formValues : cloneObject(_formValues)
|
|
1310
1677
|
});
|
|
1311
1678
|
}
|
|
1312
1679
|
}
|
|
1313
1680
|
}
|
|
1314
1681
|
}
|
|
1315
|
-
(options.shouldDirty || options.shouldTouch) && updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty,
|
|
1316
|
-
options.shouldValidate && trigger(name
|
|
1682
|
+
(options.shouldDirty || options.shouldTouch) && updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, !skipRender);
|
|
1683
|
+
options.shouldValidate && trigger(name, {
|
|
1684
|
+
delayError: options.delayError
|
|
1685
|
+
});
|
|
1317
1686
|
};
|
|
1318
|
-
const
|
|
1687
|
+
const setFieldValues = (name, value, options, skipClone = false, skipRender = false) => {
|
|
1319
1688
|
for (const fieldKey in value) {
|
|
1689
|
+
if (!value.hasOwnProperty(fieldKey)) {
|
|
1690
|
+
return;
|
|
1691
|
+
}
|
|
1320
1692
|
const fieldValue = value[fieldKey];
|
|
1321
|
-
const fieldName =
|
|
1693
|
+
const fieldName = name + "." + fieldKey;
|
|
1322
1694
|
const field = get(_fields, fieldName);
|
|
1323
|
-
(_names.array.has(name) ||
|
|
1695
|
+
(_names.array.has(name) || isObject(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setFieldValues(fieldName, fieldValue, options, skipClone, skipRender) : setFieldValue(fieldName, fieldValue, options, skipClone, skipRender);
|
|
1324
1696
|
}
|
|
1325
1697
|
};
|
|
1326
|
-
const
|
|
1698
|
+
const _setValue = (name, value, options, skipClone, skipStateEmit = false) => {
|
|
1327
1699
|
const field = get(_fields, name);
|
|
1328
1700
|
const isFieldArray = _names.array.has(name);
|
|
1329
|
-
const cloneValue = cloneObject(value);
|
|
1330
|
-
|
|
1701
|
+
const cloneValue = skipClone ? value : cloneObject(value);
|
|
1702
|
+
const previousValue = get(_formValues, name);
|
|
1703
|
+
const isValueUnchanged = deepEqual(previousValue, cloneValue);
|
|
1704
|
+
if (!isValueUnchanged) {
|
|
1705
|
+
set(_formValues, name, cloneValue);
|
|
1706
|
+
}
|
|
1331
1707
|
if (isFieldArray) {
|
|
1332
1708
|
_subjects.array.next({
|
|
1333
1709
|
name,
|
|
1334
|
-
values:
|
|
1710
|
+
values: skipClone ? _formValues : cloneObject(_formValues)
|
|
1335
1711
|
});
|
|
1336
|
-
if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) && options.shouldDirty) {
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1712
|
+
if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields || _proxySubscribeFormState.isDirty || _proxySubscribeFormState.dirtyFields) && options.shouldDirty) {
|
|
1713
|
+
_updateDirtyFields();
|
|
1714
|
+
if (!skipStateEmit) {
|
|
1715
|
+
_subjects.state.next({
|
|
1716
|
+
name,
|
|
1717
|
+
dirtyFields: _formState.dirtyFields,
|
|
1718
|
+
isDirty: _getDirty(name, cloneValue)
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1342
1721
|
}
|
|
1343
1722
|
} else {
|
|
1344
|
-
|
|
1723
|
+
const isEmpty = Array.isArray(cloneValue) && !cloneValue.length || isEmptyObject(cloneValue);
|
|
1724
|
+
if (!field || field._f || isNullOrUndefined(cloneValue) || isEmpty) {
|
|
1725
|
+
setFieldValue(name, cloneValue, options, skipClone, skipStateEmit);
|
|
1726
|
+
} else {
|
|
1727
|
+
setFieldValues(name, cloneValue, options, skipClone, skipStateEmit);
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
if (!isValueUnchanged && !skipStateEmit) {
|
|
1731
|
+
const watched = isWatched(name, _names);
|
|
1732
|
+
const values = skipClone ? _formValues : cloneObject(_formValues);
|
|
1733
|
+
_subjects.state.next({
|
|
1734
|
+
...watched && _formState,
|
|
1735
|
+
name: _state.mount || watched ? name : void 0,
|
|
1736
|
+
values
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
const setValue = (name, value, options = {}) => _setValue(name, value, options, false);
|
|
1741
|
+
const setValues = (formValues, options = {}) => {
|
|
1742
|
+
const updatedFormValues = isFunction(formValues) ? formValues(_formValues) : formValues;
|
|
1743
|
+
if (!deepEqual(_formValues, updatedFormValues)) {
|
|
1744
|
+
_formValues = {
|
|
1745
|
+
..._formValues,
|
|
1746
|
+
...updatedFormValues
|
|
1747
|
+
};
|
|
1748
|
+
const flattenedUpdates = flatten(updatedFormValues);
|
|
1749
|
+
for (const fieldName of _names.mount) {
|
|
1750
|
+
if (fieldName in flattenedUpdates) {
|
|
1751
|
+
_setValue(fieldName, flattenedUpdates[fieldName], options, true, true);
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
_subjects.state.next({
|
|
1755
|
+
..._formState,
|
|
1756
|
+
name: void 0,
|
|
1757
|
+
type: void 0,
|
|
1758
|
+
..._valuesSubscriberCount ? { values: _formValues } : {}
|
|
1759
|
+
});
|
|
1760
|
+
if (options.shouldValidate) {
|
|
1761
|
+
_setValid();
|
|
1762
|
+
}
|
|
1345
1763
|
}
|
|
1346
|
-
isWatched(name, _names) && _subjects.state.next({ ..._formState });
|
|
1347
|
-
_subjects.values.next({
|
|
1348
|
-
name,
|
|
1349
|
-
values: { ..._formValues }
|
|
1350
|
-
});
|
|
1351
|
-
!_state.mount && flushRootRender();
|
|
1352
1764
|
};
|
|
1353
1765
|
const onChange = async (event) => {
|
|
1766
|
+
_state.mount = true;
|
|
1354
1767
|
const target = event.target;
|
|
1355
1768
|
let name = target.name;
|
|
1356
1769
|
let isFieldValueUpdated = true;
|
|
1357
1770
|
const field = get(_fields, name);
|
|
1358
|
-
const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);
|
|
1359
1771
|
const _updateIsFieldValueUpdated = (fieldValue) => {
|
|
1360
|
-
isFieldValueUpdated = Number.isNaN(fieldValue) || fieldValue
|
|
1772
|
+
isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
|
1361
1773
|
};
|
|
1362
1774
|
if (field) {
|
|
1363
1775
|
let error;
|
|
1364
1776
|
let isValid;
|
|
1365
|
-
const fieldValue =
|
|
1777
|
+
const fieldValue = target.type ? getFieldValue(field._f) : getEventValue(event);
|
|
1366
1778
|
const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;
|
|
1367
|
-
const
|
|
1779
|
+
const hasNoValidationEffect = !hasValidation(field._f) && !props.validate && !_options.resolver && !get(_formState.errors, name) && !field._f.deps;
|
|
1780
|
+
const shouldSkipValidation = hasNoValidationEffect || skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, _validationModeAfterSubmit, _validationModeBeforeSubmit);
|
|
1368
1781
|
const watched = isWatched(name, _names, isBlurEvent);
|
|
1369
1782
|
set(_formValues, name, fieldValue);
|
|
1370
1783
|
if (isBlurEvent) {
|
|
1371
|
-
|
|
1372
|
-
|
|
1784
|
+
if (!target || !target.readOnly) {
|
|
1785
|
+
field._f.onBlur && field._f.onBlur(event);
|
|
1786
|
+
const pendingDelayError = delayErrorCallbacks[name];
|
|
1787
|
+
pendingDelayError && pendingDelayError(0);
|
|
1788
|
+
}
|
|
1373
1789
|
} else if (field._f.onChange) {
|
|
1374
1790
|
field._f.onChange(event);
|
|
1375
1791
|
}
|
|
1376
|
-
const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent
|
|
1792
|
+
const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);
|
|
1377
1793
|
const shouldRender = !isEmptyObject(fieldState) || watched;
|
|
1378
|
-
!isBlurEvent && _subjects.
|
|
1794
|
+
!isBlurEvent && _subjects.state.next({
|
|
1379
1795
|
name,
|
|
1380
1796
|
type: event.type,
|
|
1381
|
-
values:
|
|
1797
|
+
..._valuesSubscriberCount ? { values: cloneObject(_formValues) } : {}
|
|
1382
1798
|
});
|
|
1383
1799
|
if (shouldSkipValidation) {
|
|
1384
|
-
|
|
1800
|
+
if ((!hasNoValidationEffect || !_formState.isValid) && (_proxyFormState.isValid || _proxySubscribeFormState.isValid)) {
|
|
1801
|
+
if (_options.mode === "onBlur") {
|
|
1802
|
+
if (isBlurEvent) {
|
|
1803
|
+
_setValid();
|
|
1804
|
+
}
|
|
1805
|
+
} else if (!isBlurEvent) {
|
|
1806
|
+
_setValid();
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1385
1809
|
return shouldRender && _subjects.state.next({ name, ...watched ? {} : fieldState });
|
|
1386
1810
|
}
|
|
1811
|
+
if (!_options.resolver && props.validate) {
|
|
1812
|
+
await validateForm({
|
|
1813
|
+
name,
|
|
1814
|
+
eventType: event.type
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1387
1817
|
!isBlurEvent && watched && _subjects.state.next({ ..._formState });
|
|
1388
|
-
_updateIsValidating(true);
|
|
1389
1818
|
if (_options.resolver) {
|
|
1390
|
-
const { errors } = await
|
|
1819
|
+
const { errors } = await _runSchema([name]);
|
|
1820
|
+
_updateIsValidating([name]);
|
|
1391
1821
|
_updateIsFieldValueUpdated(fieldValue);
|
|
1392
|
-
if (isFieldValueUpdated) {
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
error = errorLookupResult.error;
|
|
1396
|
-
name = errorLookupResult.name;
|
|
1397
|
-
isValid = isEmptyObject(errors);
|
|
1822
|
+
if (!isFieldValueUpdated) {
|
|
1823
|
+
!isEmptyObject(fieldState) && _subjects.state.next(fieldState);
|
|
1824
|
+
return;
|
|
1398
1825
|
}
|
|
1826
|
+
const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);
|
|
1827
|
+
const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);
|
|
1828
|
+
error = errorLookupResult.error;
|
|
1829
|
+
name = errorLookupResult.name;
|
|
1830
|
+
isValid = isEmptyObject(errors);
|
|
1399
1831
|
} else {
|
|
1400
|
-
|
|
1832
|
+
_updateIsValidating([name], true);
|
|
1833
|
+
error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];
|
|
1834
|
+
_updateIsValidating([name]);
|
|
1401
1835
|
_updateIsFieldValueUpdated(fieldValue);
|
|
1402
1836
|
if (isFieldValueUpdated) {
|
|
1403
1837
|
if (error) {
|
|
1404
1838
|
isValid = false;
|
|
1405
|
-
} else if (_proxyFormState.isValid) {
|
|
1406
|
-
isValid = await executeBuiltInValidation(
|
|
1839
|
+
} else if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
|
|
1840
|
+
isValid = await executeBuiltInValidation({
|
|
1841
|
+
fields: _fields,
|
|
1842
|
+
onlyCheckValid: true,
|
|
1843
|
+
name,
|
|
1844
|
+
eventType: event.type
|
|
1845
|
+
});
|
|
1407
1846
|
}
|
|
1408
1847
|
}
|
|
1409
1848
|
}
|
|
1410
1849
|
if (isFieldValueUpdated) {
|
|
1411
|
-
field._f.deps && trigger(field._f.deps);
|
|
1850
|
+
field._f.deps && (!Array.isArray(field._f.deps) || field._f.deps.length > 0) && trigger(field._f.deps);
|
|
1412
1851
|
shouldRenderByError(name, isValid, error, fieldState);
|
|
1413
1852
|
}
|
|
1414
1853
|
}
|
|
@@ -1424,7 +1863,6 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1424
1863
|
let isValid;
|
|
1425
1864
|
let validationResult;
|
|
1426
1865
|
const fieldNames = convertToArrayPayload(name);
|
|
1427
|
-
_updateIsValidating(true);
|
|
1428
1866
|
if (_options.resolver) {
|
|
1429
1867
|
const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);
|
|
1430
1868
|
isValid = isEmptyObject(errors);
|
|
@@ -1432,43 +1870,77 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1432
1870
|
} else if (name) {
|
|
1433
1871
|
validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {
|
|
1434
1872
|
const field = get(_fields, fieldName);
|
|
1435
|
-
return await executeBuiltInValidation(
|
|
1873
|
+
return await executeBuiltInValidation({
|
|
1874
|
+
fields: field && field._f ? { [fieldName]: field } : field,
|
|
1875
|
+
eventType: EVENTS.TRIGGER
|
|
1876
|
+
});
|
|
1436
1877
|
}))).every(Boolean);
|
|
1437
|
-
!(!validationResult && !_formState.isValid) &&
|
|
1878
|
+
!(!validationResult && !_formState.isValid) && _setValid();
|
|
1438
1879
|
} else {
|
|
1439
|
-
validationResult = isValid = await executeBuiltInValidation(
|
|
1880
|
+
validationResult = isValid = await executeBuiltInValidation({
|
|
1881
|
+
fields: _fields,
|
|
1882
|
+
name,
|
|
1883
|
+
eventType: EVENTS.TRIGGER
|
|
1884
|
+
});
|
|
1885
|
+
}
|
|
1886
|
+
if (options.delayError && _options.delayError && isString(name)) {
|
|
1887
|
+
const error = get(_formState.errors, name);
|
|
1888
|
+
if (error) {
|
|
1889
|
+
unset(_formState.errors, name);
|
|
1890
|
+
delayErrorCallbacks[name] = debounce(name, () => updateErrors(name, error));
|
|
1891
|
+
delayErrorCallbacks[name](_options.delayError);
|
|
1892
|
+
} else {
|
|
1893
|
+
clearTimeout(timers[name]);
|
|
1894
|
+
delete delayErrorCallbacks[name];
|
|
1895
|
+
}
|
|
1440
1896
|
}
|
|
1441
1897
|
_subjects.state.next({
|
|
1442
|
-
...!isString(name) || _proxyFormState.isValid && isValid !== _formState.isValid ? {} : { name },
|
|
1898
|
+
...!isString(name) || (_proxyFormState.isValid || _proxySubscribeFormState.isValid) && isValid !== _formState.isValid ? {} : { name },
|
|
1443
1899
|
..._options.resolver || !name ? { isValid } : {},
|
|
1444
|
-
errors: _formState.errors
|
|
1445
|
-
isValidating: false
|
|
1900
|
+
errors: _formState.errors
|
|
1446
1901
|
});
|
|
1447
1902
|
options.shouldFocus && !validationResult && iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);
|
|
1448
1903
|
return validationResult;
|
|
1449
1904
|
};
|
|
1450
|
-
const getValues = (fieldNames) => {
|
|
1451
|
-
|
|
1452
|
-
..._defaultValues
|
|
1453
|
-
..._state.mount ? _formValues : {}
|
|
1905
|
+
const getValues = (fieldNames, config2) => {
|
|
1906
|
+
let values = {
|
|
1907
|
+
..._state.mount ? _formValues : _defaultValues
|
|
1454
1908
|
};
|
|
1909
|
+
if (config2) {
|
|
1910
|
+
values = extractFormValues(config2.dirtyFields ? _formState.dirtyFields : _formState.touchedFields, values);
|
|
1911
|
+
}
|
|
1455
1912
|
return isUndefined(fieldNames) ? values : isString(fieldNames) ? get(values, fieldNames) : fieldNames.map((name) => get(values, name));
|
|
1456
1913
|
};
|
|
1457
1914
|
const getFieldState = (name, formState) => ({
|
|
1458
1915
|
invalid: !!get((formState || _formState).errors, name),
|
|
1459
1916
|
isDirty: !!get((formState || _formState).dirtyFields, name),
|
|
1460
|
-
|
|
1461
|
-
|
|
1917
|
+
error: get((formState || _formState).errors, name),
|
|
1918
|
+
isValidating: !!get(_formState.validatingFields, name),
|
|
1919
|
+
isTouched: !!get((formState || _formState).touchedFields, name)
|
|
1462
1920
|
});
|
|
1463
1921
|
const clearErrors = (name) => {
|
|
1464
|
-
name
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1922
|
+
const names = name ? convertToArrayPayload(name) : void 0;
|
|
1923
|
+
names === null || names === void 0 ? void 0 : names.forEach((inputName) => unset(_formState.errors, inputName));
|
|
1924
|
+
if (names) {
|
|
1925
|
+
names.forEach((inputName) => {
|
|
1926
|
+
_subjects.state.next({
|
|
1927
|
+
name: inputName,
|
|
1928
|
+
errors: _formState.errors
|
|
1929
|
+
});
|
|
1930
|
+
});
|
|
1931
|
+
} else {
|
|
1932
|
+
_formState.errors = {};
|
|
1933
|
+
_subjects.state.next({
|
|
1934
|
+
errors: _formState.errors
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1468
1937
|
};
|
|
1469
1938
|
const setError = (name, error, options) => {
|
|
1470
1939
|
const ref = (get(_fields, name, { _f: {} })._f || {}).ref;
|
|
1940
|
+
const currentError = get(_formState.errors, name) || {};
|
|
1941
|
+
const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;
|
|
1471
1942
|
set(_formState.errors, name, {
|
|
1943
|
+
...restOfErrorTree,
|
|
1472
1944
|
...error,
|
|
1473
1945
|
ref
|
|
1474
1946
|
});
|
|
@@ -1479,9 +1951,72 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1479
1951
|
});
|
|
1480
1952
|
options && options.shouldFocus && ref && ref.focus && ref.focus();
|
|
1481
1953
|
};
|
|
1482
|
-
const watch = (name, defaultValue) =>
|
|
1483
|
-
|
|
1484
|
-
|
|
1954
|
+
const watch = (name, defaultValue) => {
|
|
1955
|
+
if (isFunction(name)) {
|
|
1956
|
+
_valuesSubscriberCount++;
|
|
1957
|
+
const { unsubscribe } = _subjects.state.subscribe({
|
|
1958
|
+
next: (payload) => "values" in payload && name(payload.values || _getWatch(void 0, defaultValue), payload)
|
|
1959
|
+
});
|
|
1960
|
+
let called = false;
|
|
1961
|
+
return {
|
|
1962
|
+
unsubscribe: () => {
|
|
1963
|
+
if (called) {
|
|
1964
|
+
return;
|
|
1965
|
+
}
|
|
1966
|
+
called = true;
|
|
1967
|
+
_valuesSubscriberCount--;
|
|
1968
|
+
unsubscribe();
|
|
1969
|
+
}
|
|
1970
|
+
};
|
|
1971
|
+
}
|
|
1972
|
+
return _getWatch(name, defaultValue, true);
|
|
1973
|
+
};
|
|
1974
|
+
const _subscribe = (props2) => {
|
|
1975
|
+
var _a;
|
|
1976
|
+
const needsValues = !!((_a = props2.formState) === null || _a === void 0 ? void 0 : _a.values);
|
|
1977
|
+
if (needsValues) {
|
|
1978
|
+
_valuesSubscriberCount++;
|
|
1979
|
+
}
|
|
1980
|
+
const { unsubscribe } = _subjects.state.subscribe({
|
|
1981
|
+
next: (formState) => {
|
|
1982
|
+
if (shouldSubscribeByName(props2.name, formState.name, props2.exact) && shouldRenderFormState(formState, props2.formState || _proxyFormState, _setFormState, props2.reRenderRoot)) {
|
|
1983
|
+
const snapshot = { ..._formValues };
|
|
1984
|
+
props2.callback({
|
|
1985
|
+
values: snapshot,
|
|
1986
|
+
..._formState,
|
|
1987
|
+
...formState,
|
|
1988
|
+
defaultValues: _defaultValues
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
});
|
|
1993
|
+
if (!needsValues) {
|
|
1994
|
+
return unsubscribe;
|
|
1995
|
+
}
|
|
1996
|
+
let called = false;
|
|
1997
|
+
return () => {
|
|
1998
|
+
if (called) {
|
|
1999
|
+
return;
|
|
2000
|
+
}
|
|
2001
|
+
called = true;
|
|
2002
|
+
_valuesSubscriberCount--;
|
|
2003
|
+
unsubscribe();
|
|
2004
|
+
};
|
|
2005
|
+
};
|
|
2006
|
+
const subscribe = (props2) => {
|
|
2007
|
+
_state.mount = true;
|
|
2008
|
+
_proxySubscribeFormState = {
|
|
2009
|
+
..._proxySubscribeFormState,
|
|
2010
|
+
...props2.formState
|
|
2011
|
+
};
|
|
2012
|
+
return _subscribe({
|
|
2013
|
+
...props2,
|
|
2014
|
+
formState: {
|
|
2015
|
+
...defaultProxyFormState,
|
|
2016
|
+
...props2.formState
|
|
2017
|
+
}
|
|
2018
|
+
});
|
|
2019
|
+
};
|
|
1485
2020
|
const unregister = (name, options = {}) => {
|
|
1486
2021
|
for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {
|
|
1487
2022
|
_names.mount.delete(fieldName);
|
|
@@ -1493,27 +2028,31 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1493
2028
|
!options.keepError && unset(_formState.errors, fieldName);
|
|
1494
2029
|
!options.keepDirty && unset(_formState.dirtyFields, fieldName);
|
|
1495
2030
|
!options.keepTouched && unset(_formState.touchedFields, fieldName);
|
|
2031
|
+
!options.keepIsValidating && unset(_formState.validatingFields, fieldName);
|
|
1496
2032
|
!_options.shouldUnregister && !options.keepDefaultValue && unset(_defaultValues, fieldName);
|
|
1497
2033
|
}
|
|
1498
|
-
_subjects.
|
|
1499
|
-
values:
|
|
2034
|
+
_subjects.state.next({
|
|
2035
|
+
values: cloneObject(_formValues)
|
|
1500
2036
|
});
|
|
1501
2037
|
_subjects.state.next({
|
|
1502
2038
|
..._formState,
|
|
1503
2039
|
...!options.keepDirty ? {} : { isDirty: _getDirty() }
|
|
1504
2040
|
});
|
|
1505
|
-
!options.keepIsValid &&
|
|
2041
|
+
!options.keepIsValid && _setValid();
|
|
1506
2042
|
};
|
|
1507
|
-
const
|
|
1508
|
-
if (isBoolean(disabled)) {
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
2043
|
+
const _setDisabledField = ({ disabled, name }) => {
|
|
2044
|
+
if (isBoolean(disabled) && _state.mount || !!disabled || _names.disabled.has(name)) {
|
|
2045
|
+
const wasDisabled = _names.disabled.has(name);
|
|
2046
|
+
const isDisabled = !!disabled;
|
|
2047
|
+
const disabledStateChanged = wasDisabled !== isDisabled;
|
|
2048
|
+
disabled ? _names.disabled.add(name) : _names.disabled.delete(name);
|
|
2049
|
+
disabledStateChanged && _state.mount && !_state.action && _setValid();
|
|
1512
2050
|
}
|
|
1513
2051
|
};
|
|
1514
2052
|
const register = (name, options = {}) => {
|
|
1515
2053
|
let field = get(_fields, name);
|
|
1516
|
-
const disabledIsDefined = isBoolean(options.disabled);
|
|
2054
|
+
const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);
|
|
2055
|
+
const shouldRevalidateRemount = !_names.registerName.has(name) && field && field._f && !field._f.mount;
|
|
1517
2056
|
set(_fields, name, {
|
|
1518
2057
|
...field || {},
|
|
1519
2058
|
_f: {
|
|
@@ -1524,17 +2063,16 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1524
2063
|
}
|
|
1525
2064
|
});
|
|
1526
2065
|
_names.mount.add(name);
|
|
1527
|
-
if (field) {
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
disabled: options.disabled,
|
|
2066
|
+
if (field && !shouldRevalidateRemount) {
|
|
2067
|
+
_setDisabledField({
|
|
2068
|
+
disabled: isBoolean(options.disabled) ? options.disabled : _options.disabled,
|
|
1531
2069
|
name
|
|
1532
2070
|
});
|
|
1533
2071
|
} else {
|
|
1534
2072
|
updateValidAndValue(name, true, options.value);
|
|
1535
2073
|
}
|
|
1536
2074
|
return {
|
|
1537
|
-
...disabledIsDefined ? { disabled: options.disabled } : {},
|
|
2075
|
+
...disabledIsDefined ? { disabled: options.disabled || _options.disabled } : {},
|
|
1538
2076
|
..._options.progressive ? {
|
|
1539
2077
|
required: !!options.required,
|
|
1540
2078
|
min: getRuleValue(options.min),
|
|
@@ -1548,7 +2086,9 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1548
2086
|
onBlur: onChange,
|
|
1549
2087
|
ref: (ref) => {
|
|
1550
2088
|
if (ref) {
|
|
2089
|
+
_names.registerName.add(name);
|
|
1551
2090
|
register(name, options);
|
|
2091
|
+
_names.registerName.delete(name);
|
|
1552
2092
|
field = get(_fields, name);
|
|
1553
2093
|
const fieldRef = isUndefined(ref.value) ? ref.querySelectorAll ? ref.querySelectorAll("input,select,textarea")[0] || ref : ref : ref;
|
|
1554
2094
|
const radioOrCheckbox = isRadioOrCheckbox(fieldRef);
|
|
@@ -1556,18 +2096,22 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1556
2096
|
if (radioOrCheckbox ? refs.find((option) => option === fieldRef) : fieldRef === field._f.ref) {
|
|
1557
2097
|
return;
|
|
1558
2098
|
}
|
|
2099
|
+
const newField = {
|
|
2100
|
+
...field._f
|
|
2101
|
+
};
|
|
2102
|
+
if (radioOrCheckbox) {
|
|
2103
|
+
newField.refs = [
|
|
2104
|
+
...refs.filter(live),
|
|
2105
|
+
fieldRef,
|
|
2106
|
+
...Array.isArray(get(_defaultValues, name)) ? [{}] : []
|
|
2107
|
+
];
|
|
2108
|
+
newField.ref = { type: fieldRef.type, name };
|
|
2109
|
+
} else {
|
|
2110
|
+
newField.ref = fieldRef;
|
|
2111
|
+
delete newField.refs;
|
|
2112
|
+
}
|
|
1559
2113
|
set(_fields, name, {
|
|
1560
|
-
_f:
|
|
1561
|
-
...field._f,
|
|
1562
|
-
...radioOrCheckbox ? {
|
|
1563
|
-
refs: [
|
|
1564
|
-
...refs.filter(live),
|
|
1565
|
-
fieldRef,
|
|
1566
|
-
...Array.isArray(get(_defaultValues, name)) ? [{}] : []
|
|
1567
|
-
],
|
|
1568
|
-
ref: { type: fieldRef.type, name }
|
|
1569
|
-
} : { ref: fieldRef }
|
|
1570
|
-
}
|
|
2114
|
+
_f: newField
|
|
1571
2115
|
});
|
|
1572
2116
|
updateValidAndValue(name, false, void 0, fieldRef);
|
|
1573
2117
|
} else {
|
|
@@ -1580,21 +2124,25 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1580
2124
|
}
|
|
1581
2125
|
};
|
|
1582
2126
|
};
|
|
1583
|
-
const _focusError = () => _options.shouldFocusError && iterateFieldsByAction(_fields, _focusInput, _names.mount);
|
|
2127
|
+
const _focusError = () => _options.shouldFocusError && !_options.shouldUseNativeValidation && iterateFieldsByAction(_fields, _focusInput, _names.mount);
|
|
1584
2128
|
const _disableForm = (disabled) => {
|
|
1585
2129
|
if (isBoolean(disabled)) {
|
|
1586
2130
|
_subjects.state.next({ disabled });
|
|
1587
2131
|
iterateFieldsByAction(_fields, (ref, name) => {
|
|
1588
|
-
let requiredDisabledState = disabled;
|
|
1589
2132
|
const currentField = get(_fields, name);
|
|
1590
|
-
if (currentField
|
|
1591
|
-
|
|
2133
|
+
if (currentField) {
|
|
2134
|
+
ref.disabled = currentField._f.disabled || disabled;
|
|
2135
|
+
if (Array.isArray(currentField._f.refs)) {
|
|
2136
|
+
currentField._f.refs.forEach((inputRef) => {
|
|
2137
|
+
inputRef.disabled = currentField._f.disabled || disabled;
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
1592
2140
|
}
|
|
1593
|
-
ref.disabled = requiredDisabledState;
|
|
1594
2141
|
}, 0, false);
|
|
1595
2142
|
}
|
|
1596
2143
|
};
|
|
1597
2144
|
const handleSubmit = (onValid, onInvalid) => async (e) => {
|
|
2145
|
+
let onValidError = void 0;
|
|
1598
2146
|
if (e) {
|
|
1599
2147
|
e.preventDefault && e.preventDefault();
|
|
1600
2148
|
e.persist && e.persist();
|
|
@@ -1604,18 +2152,31 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1604
2152
|
isSubmitting: true
|
|
1605
2153
|
});
|
|
1606
2154
|
if (_options.resolver) {
|
|
1607
|
-
const { errors, values } = await
|
|
2155
|
+
const { errors, values } = await _runSchema();
|
|
2156
|
+
_updateIsValidating();
|
|
1608
2157
|
_formState.errors = errors;
|
|
1609
|
-
fieldValues = values;
|
|
2158
|
+
fieldValues = cloneObject(values);
|
|
1610
2159
|
} else {
|
|
1611
|
-
await executeBuiltInValidation(
|
|
2160
|
+
await executeBuiltInValidation({
|
|
2161
|
+
fields: _fields,
|
|
2162
|
+
eventType: EVENTS.SUBMIT
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2165
|
+
if (_names.disabled.size) {
|
|
2166
|
+
for (const name of _names.disabled) {
|
|
2167
|
+
unset(fieldValues, name);
|
|
2168
|
+
}
|
|
1612
2169
|
}
|
|
1613
|
-
unset(_formState.errors,
|
|
2170
|
+
unset(_formState.errors, ROOT_ERROR_TYPE);
|
|
1614
2171
|
if (isEmptyObject(_formState.errors)) {
|
|
1615
2172
|
_subjects.state.next({
|
|
1616
2173
|
errors: {}
|
|
1617
2174
|
});
|
|
1618
|
-
|
|
2175
|
+
try {
|
|
2176
|
+
await onValid(fieldValues, e);
|
|
2177
|
+
} catch (error) {
|
|
2178
|
+
onValidError = error;
|
|
2179
|
+
}
|
|
1619
2180
|
} else {
|
|
1620
2181
|
if (onInvalid) {
|
|
1621
2182
|
await onInvalid({ ..._formState.errors }, e);
|
|
@@ -1626,29 +2187,32 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1626
2187
|
_subjects.state.next({
|
|
1627
2188
|
isSubmitted: true,
|
|
1628
2189
|
isSubmitting: false,
|
|
1629
|
-
isSubmitSuccessful: isEmptyObject(_formState.errors),
|
|
2190
|
+
isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,
|
|
1630
2191
|
submitCount: _formState.submitCount + 1,
|
|
1631
2192
|
errors: _formState.errors
|
|
1632
2193
|
});
|
|
2194
|
+
if (onValidError) {
|
|
2195
|
+
throw onValidError;
|
|
2196
|
+
}
|
|
1633
2197
|
};
|
|
1634
2198
|
const resetField = (name, options = {}) => {
|
|
1635
2199
|
if (get(_fields, name)) {
|
|
1636
2200
|
if (isUndefined(options.defaultValue)) {
|
|
1637
|
-
setValue(name, get(_defaultValues, name));
|
|
2201
|
+
setValue(name, cloneObject(get(_defaultValues, name)));
|
|
1638
2202
|
} else {
|
|
1639
2203
|
setValue(name, options.defaultValue);
|
|
1640
|
-
set(_defaultValues, name, options.defaultValue);
|
|
2204
|
+
set(_defaultValues, name, cloneObject(options.defaultValue));
|
|
1641
2205
|
}
|
|
1642
2206
|
if (!options.keepTouched) {
|
|
1643
2207
|
unset(_formState.touchedFields, name);
|
|
1644
2208
|
}
|
|
1645
2209
|
if (!options.keepDirty) {
|
|
1646
2210
|
unset(_formState.dirtyFields, name);
|
|
1647
|
-
_formState.isDirty = options.defaultValue ? _getDirty(name, get(_defaultValues, name)) : _getDirty();
|
|
2211
|
+
_formState.isDirty = options.defaultValue ? _getDirty(name, cloneObject(get(_defaultValues, name))) : _getDirty();
|
|
1648
2212
|
}
|
|
1649
2213
|
if (!options.keepError) {
|
|
1650
2214
|
unset(_formState.errors, name);
|
|
1651
|
-
_proxyFormState.isValid &&
|
|
2215
|
+
_proxyFormState.isValid && _setValid();
|
|
1652
2216
|
}
|
|
1653
2217
|
_subjects.state.next({ ..._formState });
|
|
1654
2218
|
}
|
|
@@ -1656,14 +2220,27 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1656
2220
|
const _reset = (formValues, keepStateOptions = {}) => {
|
|
1657
2221
|
const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;
|
|
1658
2222
|
const cloneUpdatedValues = cloneObject(updatedValues);
|
|
1659
|
-
const
|
|
2223
|
+
const isEmptyResetValues = isEmptyObject(formValues);
|
|
2224
|
+
const values = cloneUpdatedValues;
|
|
2225
|
+
const fieldRefs = _fields;
|
|
1660
2226
|
if (!keepStateOptions.keepDefaultValues) {
|
|
1661
2227
|
_defaultValues = updatedValues;
|
|
1662
2228
|
}
|
|
1663
2229
|
if (!keepStateOptions.keepValues) {
|
|
1664
|
-
if (keepStateOptions.keepDirtyValues
|
|
1665
|
-
|
|
1666
|
-
|
|
2230
|
+
if (keepStateOptions.keepDirtyValues) {
|
|
2231
|
+
const fieldsToCheck = /* @__PURE__ */ new Set([
|
|
2232
|
+
..._names.mount,
|
|
2233
|
+
...Object.keys(getDirtyFields(_defaultValues, _formValues, void 0, fieldRefs))
|
|
2234
|
+
]);
|
|
2235
|
+
for (const fieldName of Array.from(fieldsToCheck)) {
|
|
2236
|
+
const isDirty = get(_formState.dirtyFields, fieldName);
|
|
2237
|
+
const existingValue = get(_formValues, fieldName);
|
|
2238
|
+
const newValue = get(values, fieldName);
|
|
2239
|
+
if (isDirty && !isUndefined(existingValue)) {
|
|
2240
|
+
set(values, fieldName, existingValue);
|
|
2241
|
+
} else if (!isDirty && !isUndefined(newValue)) {
|
|
2242
|
+
setValue(fieldName, newValue);
|
|
2243
|
+
}
|
|
1667
2244
|
}
|
|
1668
2245
|
} else {
|
|
1669
2246
|
if (isWeb && isUndefined(formValues)) {
|
|
@@ -1681,54 +2258,81 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1681
2258
|
}
|
|
1682
2259
|
}
|
|
1683
2260
|
}
|
|
1684
|
-
|
|
2261
|
+
if (keepStateOptions.keepFieldsRef) {
|
|
2262
|
+
for (const fieldName of _names.mount) {
|
|
2263
|
+
setValue(fieldName, get(values, fieldName));
|
|
2264
|
+
}
|
|
2265
|
+
} else {
|
|
2266
|
+
_fields = {};
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
if (_options.shouldUnregister) {
|
|
2270
|
+
_formValues = keepStateOptions.keepDefaultValues ? cloneObject(_defaultValues) : {};
|
|
2271
|
+
if (keepStateOptions.keepFieldsRef) {
|
|
2272
|
+
for (const fieldName of _names.mount) {
|
|
2273
|
+
set(_formValues, fieldName, get(values, fieldName));
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
} else {
|
|
2277
|
+
_formValues = cloneObject(values);
|
|
1685
2278
|
}
|
|
1686
|
-
_formValues = props.shouldUnregister ? keepStateOptions.keepDefaultValues ? cloneObject(_defaultValues) : {} : cloneObject(values);
|
|
1687
2279
|
_subjects.array.next({
|
|
1688
2280
|
values: { ...values }
|
|
1689
2281
|
});
|
|
1690
|
-
_subjects.
|
|
2282
|
+
_subjects.state.next({
|
|
2283
|
+
name: void 0,
|
|
2284
|
+
type: void 0,
|
|
1691
2285
|
values: { ...values }
|
|
1692
2286
|
});
|
|
1693
2287
|
}
|
|
1694
2288
|
_names = {
|
|
1695
|
-
mount: /* @__PURE__ */ new Set(),
|
|
2289
|
+
mount: keepStateOptions.keepDirtyValues ? _names.mount : /* @__PURE__ */ new Set(),
|
|
1696
2290
|
unMount: /* @__PURE__ */ new Set(),
|
|
1697
2291
|
array: /* @__PURE__ */ new Set(),
|
|
2292
|
+
registerName: /* @__PURE__ */ new Set(),
|
|
2293
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
1698
2294
|
watch: /* @__PURE__ */ new Set(),
|
|
1699
2295
|
watchAll: false,
|
|
1700
2296
|
focus: ""
|
|
1701
2297
|
};
|
|
1702
|
-
|
|
1703
|
-
_state.
|
|
1704
|
-
_state.
|
|
2298
|
+
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
|
|
2299
|
+
_state.watch = !!_options.shouldUnregister;
|
|
2300
|
+
_state.keepIsValid = !!keepStateOptions.keepIsValid;
|
|
2301
|
+
_state.action = false;
|
|
2302
|
+
if (!keepStateOptions.keepErrors) {
|
|
2303
|
+
_formState.errors = {};
|
|
2304
|
+
}
|
|
1705
2305
|
_subjects.state.next({
|
|
1706
2306
|
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
1707
|
-
isDirty: keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual(formValues, _defaultValues)),
|
|
2307
|
+
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : keepStateOptions.keepValues ? _getDirty() : !!(keepStateOptions.keepDefaultValues && !deepEqual(formValues, _defaultValues)),
|
|
1708
2308
|
isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false,
|
|
1709
|
-
dirtyFields: keepStateOptions.keepDirtyValues ? _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : {},
|
|
2309
|
+
dirtyFields: isEmptyResetValues ? {} : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? getDirtyFields(_defaultValues, _formValues, void 0, fieldRefs) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues, void 0, fieldRefs) : keepStateOptions.keepDirty ? _formState.dirtyFields : {},
|
|
1710
2310
|
touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {},
|
|
1711
2311
|
errors: keepStateOptions.keepErrors ? _formState.errors : {},
|
|
1712
2312
|
isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful ? _formState.isSubmitSuccessful : false,
|
|
1713
|
-
isSubmitting: false
|
|
2313
|
+
isSubmitting: false,
|
|
2314
|
+
defaultValues: _defaultValues
|
|
1714
2315
|
});
|
|
1715
2316
|
};
|
|
1716
|
-
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues) ? formValues(_formValues) : formValues, keepStateOptions);
|
|
2317
|
+
const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues) ? formValues(_formValues) : formValues, { ..._options.resetOptions, ...keepStateOptions });
|
|
1717
2318
|
const setFocus = (name, options = {}) => {
|
|
1718
2319
|
const field = get(_fields, name);
|
|
1719
2320
|
const fieldReference = field && field._f;
|
|
1720
2321
|
if (fieldReference) {
|
|
1721
2322
|
const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref;
|
|
1722
2323
|
if (fieldRef.focus) {
|
|
1723
|
-
|
|
1724
|
-
|
|
2324
|
+
setTimeout(() => {
|
|
2325
|
+
fieldRef.focus();
|
|
2326
|
+
options.shouldSelect && isFunction(fieldRef.select) && fieldRef.select();
|
|
2327
|
+
});
|
|
1725
2328
|
}
|
|
1726
2329
|
}
|
|
1727
2330
|
};
|
|
1728
|
-
const
|
|
2331
|
+
const _setFormState = (updatedFormState) => {
|
|
2332
|
+
const { name, type, values, ...formState } = updatedFormState;
|
|
1729
2333
|
_formState = {
|
|
1730
2334
|
..._formState,
|
|
1731
|
-
...
|
|
2335
|
+
...formState
|
|
1732
2336
|
};
|
|
1733
2337
|
};
|
|
1734
2338
|
const _resetDefaultValues = () => isFunction(_options.defaultValues) && _options.defaultValues().then((values) => {
|
|
@@ -1737,28 +2341,45 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1737
2341
|
isLoading: false
|
|
1738
2342
|
});
|
|
1739
2343
|
});
|
|
1740
|
-
|
|
2344
|
+
const resetDefaultValues = (values, options = {}) => {
|
|
2345
|
+
_defaultValues = cloneObject(values);
|
|
2346
|
+
if (!options.keepDirty) {
|
|
2347
|
+
const newDirtyFields = getDirtyFields(_defaultValues, _formValues, void 0, _fields);
|
|
2348
|
+
_formState.dirtyFields = newDirtyFields;
|
|
2349
|
+
_formState.isDirty = !isEmptyObject(newDirtyFields);
|
|
2350
|
+
}
|
|
2351
|
+
if (!options.keepIsValid) {
|
|
2352
|
+
_setValid();
|
|
2353
|
+
}
|
|
2354
|
+
_subjects.state.next({
|
|
2355
|
+
..._formState,
|
|
2356
|
+
defaultValues: _defaultValues
|
|
2357
|
+
});
|
|
2358
|
+
};
|
|
2359
|
+
const methods = {
|
|
1741
2360
|
control: {
|
|
1742
2361
|
register,
|
|
1743
2362
|
unregister,
|
|
1744
2363
|
getFieldState,
|
|
1745
2364
|
handleSubmit,
|
|
1746
2365
|
setError,
|
|
1747
|
-
|
|
2366
|
+
_subscribe,
|
|
2367
|
+
_runSchema,
|
|
2368
|
+
_updateIsValidating,
|
|
2369
|
+
_focusError,
|
|
1748
2370
|
_getWatch,
|
|
1749
2371
|
_getDirty,
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
2372
|
+
_setValid,
|
|
2373
|
+
_setFieldArray,
|
|
2374
|
+
_setDisabledField,
|
|
2375
|
+
_setErrors,
|
|
1754
2376
|
_getFieldArray,
|
|
1755
2377
|
_reset,
|
|
1756
2378
|
_resetDefaultValues,
|
|
1757
|
-
|
|
2379
|
+
_removeUnmounted,
|
|
1758
2380
|
_disableForm,
|
|
1759
2381
|
_subjects,
|
|
1760
2382
|
_proxyFormState,
|
|
1761
|
-
_setErrors,
|
|
1762
2383
|
get _fields() {
|
|
1763
2384
|
return _fields;
|
|
1764
2385
|
},
|
|
@@ -1783,9 +2404,6 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1783
2404
|
get _formState() {
|
|
1784
2405
|
return _formState;
|
|
1785
2406
|
},
|
|
1786
|
-
set _formState(value) {
|
|
1787
|
-
_formState = value;
|
|
1788
|
-
},
|
|
1789
2407
|
get _options() {
|
|
1790
2408
|
return _options;
|
|
1791
2409
|
},
|
|
@@ -1794,58 +2412,99 @@ function createFormControl(props = {}, flushRootRender) {
|
|
|
1794
2412
|
..._options,
|
|
1795
2413
|
...value
|
|
1796
2414
|
};
|
|
2415
|
+
_validationModeBeforeSubmit = getValidationModes(_options.mode);
|
|
2416
|
+
_validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
|
|
1797
2417
|
}
|
|
1798
2418
|
},
|
|
2419
|
+
subscribe,
|
|
1799
2420
|
trigger,
|
|
1800
2421
|
register,
|
|
1801
2422
|
handleSubmit,
|
|
1802
2423
|
watch,
|
|
1803
2424
|
setValue,
|
|
2425
|
+
setValues,
|
|
1804
2426
|
getValues,
|
|
1805
2427
|
reset,
|
|
1806
2428
|
resetField,
|
|
2429
|
+
resetDefaultValues,
|
|
1807
2430
|
clearErrors,
|
|
1808
2431
|
unregister,
|
|
1809
2432
|
setError,
|
|
1810
2433
|
setFocus,
|
|
1811
2434
|
getFieldState
|
|
1812
2435
|
};
|
|
2436
|
+
return {
|
|
2437
|
+
...methods,
|
|
2438
|
+
formControl: methods
|
|
2439
|
+
};
|
|
1813
2440
|
}
|
|
1814
2441
|
function useForm(props = {}) {
|
|
1815
|
-
const _formControl = React__default.default.useRef();
|
|
1816
|
-
const _values = React__default.default.useRef();
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1819
|
-
|
|
2442
|
+
const _formControl = React__default.default.useRef(void 0);
|
|
2443
|
+
const _values = React__default.default.useRef(void 0);
|
|
2444
|
+
const _formControlProp = React__default.default.useRef(props.formControl);
|
|
2445
|
+
const [formState, updateFormState] = React__default.default.useState(() => ({
|
|
2446
|
+
...cloneObject(DEFAULT_FORM_STATE),
|
|
1820
2447
|
isLoading: isFunction(props.defaultValues),
|
|
1821
|
-
isSubmitted: false,
|
|
1822
|
-
isSubmitting: false,
|
|
1823
|
-
isSubmitSuccessful: false,
|
|
1824
|
-
isValid: false,
|
|
1825
|
-
submitCount: 0,
|
|
1826
|
-
dirtyFields: {},
|
|
1827
|
-
touchedFields: {},
|
|
1828
2448
|
errors: props.errors || {},
|
|
1829
|
-
disabled: false,
|
|
2449
|
+
disabled: props.disabled || false,
|
|
1830
2450
|
defaultValues: isFunction(props.defaultValues) ? void 0 : props.defaultValues
|
|
1831
|
-
});
|
|
1832
|
-
if (!_formControl.current) {
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
2451
|
+
}));
|
|
2452
|
+
if (!_formControl.current || props.formControl && _formControlProp.current !== props.formControl) {
|
|
2453
|
+
_formControlProp.current = props.formControl;
|
|
2454
|
+
if (props.formControl) {
|
|
2455
|
+
_formControl.current = {
|
|
2456
|
+
...props.formControl,
|
|
2457
|
+
formState
|
|
2458
|
+
};
|
|
2459
|
+
if (props.defaultValues && !isFunction(props.defaultValues)) {
|
|
2460
|
+
props.formControl.reset(props.defaultValues, props.resetOptions);
|
|
2461
|
+
}
|
|
2462
|
+
} else {
|
|
2463
|
+
const { formControl, ...rest } = createFormControl(props);
|
|
2464
|
+
_formControl.current = {
|
|
2465
|
+
...rest,
|
|
2466
|
+
formState
|
|
2467
|
+
};
|
|
2468
|
+
}
|
|
1837
2469
|
}
|
|
1838
2470
|
const control = _formControl.current.control;
|
|
1839
2471
|
control._options = props;
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
2472
|
+
useIsomorphicLayoutEffect(() => {
|
|
2473
|
+
const sub = control._subscribe({
|
|
2474
|
+
formState: control._proxyFormState,
|
|
2475
|
+
callback: () => updateFormState({
|
|
2476
|
+
...control._formState,
|
|
2477
|
+
defaultValues: control._defaultValues
|
|
2478
|
+
}),
|
|
2479
|
+
reRenderRoot: true
|
|
2480
|
+
});
|
|
2481
|
+
updateFormState((data) => ({
|
|
2482
|
+
...data,
|
|
2483
|
+
isReady: true
|
|
2484
|
+
}));
|
|
2485
|
+
control._formState.isReady = true;
|
|
2486
|
+
return sub;
|
|
2487
|
+
}, [control]);
|
|
1848
2488
|
React__default.default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
|
|
2489
|
+
React__default.default.useEffect(() => {
|
|
2490
|
+
if (props.mode) {
|
|
2491
|
+
control._options.mode = props.mode;
|
|
2492
|
+
}
|
|
2493
|
+
if (props.reValidateMode) {
|
|
2494
|
+
control._options.reValidateMode = props.reValidateMode;
|
|
2495
|
+
}
|
|
2496
|
+
}, [control, props.mode, props.reValidateMode]);
|
|
2497
|
+
React__default.default.useEffect(() => {
|
|
2498
|
+
if (props.errors) {
|
|
2499
|
+
control._setErrors(props.errors);
|
|
2500
|
+
control._focusError();
|
|
2501
|
+
}
|
|
2502
|
+
}, [control, props.errors]);
|
|
2503
|
+
React__default.default.useEffect(() => {
|
|
2504
|
+
props.shouldUnregister && control._subjects.state.next({
|
|
2505
|
+
values: control._getWatch()
|
|
2506
|
+
});
|
|
2507
|
+
}, [control, props.shouldUnregister]);
|
|
1849
2508
|
React__default.default.useEffect(() => {
|
|
1850
2509
|
if (control._proxyFormState.isDirty) {
|
|
1851
2510
|
const isDirty = control._getDirty();
|
|
@@ -1857,22 +2516,24 @@ function useForm(props = {}) {
|
|
|
1857
2516
|
}
|
|
1858
2517
|
}, [control, formState.isDirty]);
|
|
1859
2518
|
React__default.default.useEffect(() => {
|
|
2519
|
+
var _a;
|
|
1860
2520
|
if (props.values && !deepEqual(props.values, _values.current)) {
|
|
1861
|
-
control._reset(props.values,
|
|
2521
|
+
control._reset(props.values, {
|
|
2522
|
+
keepFieldsRef: true,
|
|
2523
|
+
...control._options.resetOptions
|
|
2524
|
+
});
|
|
2525
|
+
if (!((_a = control._options.resetOptions) === null || _a === void 0 ? void 0 : _a.keepIsValid)) {
|
|
2526
|
+
control._setValid();
|
|
2527
|
+
}
|
|
1862
2528
|
_values.current = props.values;
|
|
1863
2529
|
updateFormState((state) => ({ ...state }));
|
|
1864
2530
|
} else {
|
|
1865
2531
|
control._resetDefaultValues();
|
|
1866
2532
|
}
|
|
1867
|
-
}, [props.values
|
|
1868
|
-
React__default.default.useEffect(() => {
|
|
1869
|
-
if (props.errors) {
|
|
1870
|
-
control._setErrors(props.errors);
|
|
1871
|
-
}
|
|
1872
|
-
}, [props.errors, control]);
|
|
2533
|
+
}, [control, props.values]);
|
|
1873
2534
|
React__default.default.useEffect(() => {
|
|
1874
2535
|
if (!control._state.mount) {
|
|
1875
|
-
control.
|
|
2536
|
+
control._setValid();
|
|
1876
2537
|
control._state.mount = true;
|
|
1877
2538
|
}
|
|
1878
2539
|
if (control._state.watch) {
|
|
@@ -1881,7 +2542,7 @@ function useForm(props = {}) {
|
|
|
1881
2542
|
}
|
|
1882
2543
|
control._removeUnmounted();
|
|
1883
2544
|
});
|
|
1884
|
-
_formControl.current.formState = getProxyFormState(formState, control);
|
|
2545
|
+
_formControl.current.formState = React__default.default.useMemo(() => getProxyFormState(formState, control), [control, formState]);
|
|
1885
2546
|
return _formControl.current;
|
|
1886
2547
|
}
|
|
1887
2548
|
const jsonToText = (v) => v == null || v === "" ? "" : JSON.stringify(v, null, 2);
|
|
@@ -1939,13 +2600,10 @@ const IntegrationField = ({
|
|
|
1939
2600
|
rules: {
|
|
1940
2601
|
required: enforceRequired ? t("integration.form.required", { field: t(field.label) }) : false
|
|
1941
2602
|
},
|
|
1942
|
-
render: ({ field: f, fieldState }) => {
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
((_a = fieldState.error) == null ? void 0 : _a.message) && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "xsmall", className: "text-ui-fg-error", children: fieldState.error.message })
|
|
1947
|
-
] });
|
|
1948
|
-
}
|
|
2603
|
+
render: ({ field: f, fieldState }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2604
|
+
renderControl(field, f, secretConfigured, t),
|
|
2605
|
+
fieldState.error?.message && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "xsmall", className: "text-ui-fg-error", children: fieldState.error.message })
|
|
2606
|
+
] })
|
|
1949
2607
|
}
|
|
1950
2608
|
),
|
|
1951
2609
|
field.hint && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "xsmall", className: "text-ui-fg-subtle", children: t(field.hint) })
|
|
@@ -1968,8 +2626,7 @@ function renderControl(field, f, secretConfigured, t) {
|
|
|
1968
2626
|
children: [
|
|
1969
2627
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Select.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select.Value, { placeholder }) }),
|
|
1970
2628
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Select.Content, { children: declared.map((o) => {
|
|
1971
|
-
|
|
1972
|
-
const labelKey = (_a = field.optionLabels) == null ? void 0 : _a[String(o)];
|
|
2629
|
+
const labelKey = field.optionLabels?.[String(o)];
|
|
1973
2630
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Select.Item, { value: String(o), children: labelKey ? t(labelKey) : String(o) }, String(o));
|
|
1974
2631
|
}) })
|
|
1975
2632
|
]
|
|
@@ -2033,9 +2690,9 @@ function sectionDefaults(section, values) {
|
|
|
2033
2690
|
const out = {};
|
|
2034
2691
|
for (const f of section.fields) {
|
|
2035
2692
|
if (f.secret || f.control === "secret") out[f.name] = "";
|
|
2036
|
-
else if (f.control === "switch") out[f.name] =
|
|
2037
|
-
else if (f.control === "json") out[f.name] =
|
|
2038
|
-
else out[f.name] =
|
|
2693
|
+
else if (f.control === "switch") out[f.name] = values?.[f.name] ?? f.default ?? false;
|
|
2694
|
+
else if (f.control === "json") out[f.name] = values?.[f.name] ?? f.default;
|
|
2695
|
+
else out[f.name] = values?.[f.name] ?? f.default ?? "";
|
|
2039
2696
|
}
|
|
2040
2697
|
return out;
|
|
2041
2698
|
}
|
|
@@ -2067,7 +2724,7 @@ const EditSectionDrawer = ({
|
|
|
2067
2724
|
qc.invalidateQueries({ queryKey: ["integration-overview"] });
|
|
2068
2725
|
onOpenChange(false);
|
|
2069
2726
|
},
|
|
2070
|
-
onError: (e) => ui.toast.error(
|
|
2727
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.saveFailed"))
|
|
2071
2728
|
});
|
|
2072
2729
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Drawer.Content, { children: [
|
|
2073
2730
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Drawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Drawer.Title, { children: t(section.title) }) }),
|
|
@@ -2109,10 +2766,10 @@ const EditPage = () => {
|
|
|
2109
2766
|
queryKey: ["integration", provider_id],
|
|
2110
2767
|
queryFn: () => sdk.client.fetch(`/admin/integrations/${provider_id}`)
|
|
2111
2768
|
});
|
|
2112
|
-
const descriptor = data
|
|
2113
|
-
const record = data
|
|
2769
|
+
const descriptor = data?.descriptor;
|
|
2770
|
+
const record = data?.integration;
|
|
2114
2771
|
const isConfigured = !!record;
|
|
2115
|
-
const isComplete =
|
|
2772
|
+
const isComplete = data?.is_complete ?? false;
|
|
2116
2773
|
const invalidate = () => {
|
|
2117
2774
|
qc.invalidateQueries({ queryKey: ["integration", provider_id] });
|
|
2118
2775
|
qc.invalidateQueries({ queryKey: ["integration-overview"] });
|
|
@@ -2126,7 +2783,7 @@ const EditPage = () => {
|
|
|
2126
2783
|
r.status === "passed" ? ui.toast.success(t("integration.toast.connectionOk")) : ui.toast.warning(r.message ?? r.status);
|
|
2127
2784
|
invalidate();
|
|
2128
2785
|
},
|
|
2129
|
-
onError: (e) => ui.toast.error(
|
|
2786
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.testFailed"))
|
|
2130
2787
|
});
|
|
2131
2788
|
const toggleEnabled = reactQuery.useMutation({
|
|
2132
2789
|
mutationFn: (next) => sdk.client.fetch(`/admin/integrations/${provider_id}/enable`, {
|
|
@@ -2137,7 +2794,7 @@ const EditPage = () => {
|
|
|
2137
2794
|
ui.toast.success(next ? t("integration.toast.enabled") : t("integration.toast.disabled"));
|
|
2138
2795
|
invalidate();
|
|
2139
2796
|
},
|
|
2140
|
-
onError: (e) => ui.toast.error(
|
|
2797
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.updateFailed"))
|
|
2141
2798
|
});
|
|
2142
2799
|
const remove = reactQuery.useMutation({
|
|
2143
2800
|
mutationFn: () => sdk.client.fetch(`/admin/integrations/${provider_id}`, { method: "DELETE" }),
|
|
@@ -2146,7 +2803,7 @@ const EditPage = () => {
|
|
|
2146
2803
|
invalidate();
|
|
2147
2804
|
navigate("/settings/integrations");
|
|
2148
2805
|
},
|
|
2149
|
-
onError: (e) => ui.toast.error(
|
|
2806
|
+
onError: (e) => ui.toast.error(e?.message ?? t("integration.toast.deleteFailed"))
|
|
2150
2807
|
});
|
|
2151
2808
|
const onDelete = async () => {
|
|
2152
2809
|
const confirmed = await prompt({
|
|
@@ -2163,22 +2820,23 @@ const EditPage = () => {
|
|
|
2163
2820
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Container, { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsxRuntime.jsx(icons.Spinner, { className: "text-ui-fg-subtle animate-spin" }) });
|
|
2164
2821
|
}
|
|
2165
2822
|
if (!descriptor) {
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
const
|
|
2173
|
-
const
|
|
2823
|
+
throw new Medusa.FetchError(
|
|
2824
|
+
`Integration with provider_id: ${provider_id} was not found`,
|
|
2825
|
+
"There is no page at this address",
|
|
2826
|
+
404
|
|
2827
|
+
);
|
|
2828
|
+
}
|
|
2829
|
+
const version = data?.version ?? null;
|
|
2830
|
+
const author = data?.author ?? null;
|
|
2831
|
+
const authorUrl = data?.author_url ?? null;
|
|
2174
2832
|
const lifecycle = !isConfigured ? { color: "grey", label: t("integration.status.notConfigured") } : !isComplete ? { color: "orange", label: t("integration.status.incomplete") } : record.is_enabled ? { color: "green", label: t("integration.status.enabled") } : { color: "grey", label: t("integration.status.disabled") };
|
|
2175
|
-
const connection = descriptor.hasTestConnection ?
|
|
2833
|
+
const connection = descriptor.hasTestConnection ? record?.last_test_status === "passed" ? { color: "green", label: t("integration.status.connected") } : record?.last_test_status === "failed" ? { color: "red", label: t("integration.status.connectionFailed") } : null : null;
|
|
2176
2834
|
const editing = descriptor.sections.find((s) => s.id === editingSection) ?? null;
|
|
2177
|
-
const configuredSecrets = new Set(
|
|
2835
|
+
const configuredSecrets = new Set(record?.configured_secrets ?? []);
|
|
2178
2836
|
const sectionData = {
|
|
2179
2837
|
providerId: provider_id,
|
|
2180
2838
|
identifier: descriptor.identifier,
|
|
2181
|
-
values:
|
|
2839
|
+
values: record?.values ?? {},
|
|
2182
2840
|
isComplete
|
|
2183
2841
|
};
|
|
2184
2842
|
const renderSection = (section) => /* @__PURE__ */ jsxRuntime.jsx(components.LayoutComposer.Entry, { id: section.id, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "divide-y p-0", children: [
|
|
@@ -2192,17 +2850,14 @@ const EditPage = () => {
|
|
|
2192
2850
|
] }) })
|
|
2193
2851
|
] })
|
|
2194
2852
|
] }),
|
|
2195
|
-
section.fields.filter((f) => isFieldVisible(f,
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
}
|
|
2204
|
-
) }, f.name);
|
|
2205
|
-
})
|
|
2853
|
+
section.fields.filter((f) => isFieldVisible(f, record?.values ?? {})).map((f) => /* @__PURE__ */ jsxRuntime.jsx(Row, { label: t(f.label), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2854
|
+
IntegrationFieldValue,
|
|
2855
|
+
{
|
|
2856
|
+
field: f,
|
|
2857
|
+
value: record?.values?.[f.name] ?? f.default,
|
|
2858
|
+
secretConfigured: configuredSecrets.has(f.name)
|
|
2859
|
+
}
|
|
2860
|
+
) }, f.name))
|
|
2206
2861
|
] }, section.id) });
|
|
2207
2862
|
const mainSections = descriptor.sections.filter((s) => s.column !== "side");
|
|
2208
2863
|
const sideSections = descriptor.sections.filter((s) => s.column === "side");
|
|
@@ -2273,8 +2928,8 @@ const EditPage = () => {
|
|
|
2273
2928
|
onOpenChange: (open) => !open && setEditingSection(null),
|
|
2274
2929
|
providerId: provider_id,
|
|
2275
2930
|
section: editing,
|
|
2276
|
-
values:
|
|
2277
|
-
configuredSecrets:
|
|
2931
|
+
values: record?.values ?? {},
|
|
2932
|
+
configuredSecrets: record?.configured_secrets ?? []
|
|
2278
2933
|
},
|
|
2279
2934
|
editing.id
|
|
2280
2935
|
)
|
|
@@ -2299,7 +2954,7 @@ const IntegrationBreadcrumb = ({ params }) => {
|
|
|
2299
2954
|
queryFn: () => sdk.client.fetch(`/admin/integrations/${providerId}`),
|
|
2300
2955
|
enabled: !!providerId
|
|
2301
2956
|
});
|
|
2302
|
-
const descriptor = data
|
|
2957
|
+
const descriptor = data?.descriptor;
|
|
2303
2958
|
if (!descriptor) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
2304
2959
|
const name = t(descriptor.displayName);
|
|
2305
2960
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -2492,19 +3147,18 @@ const InstallModal = ({
|
|
|
2492
3147
|
item,
|
|
2493
3148
|
onOpenChange
|
|
2494
3149
|
}) => {
|
|
2495
|
-
var _a, _b, _c;
|
|
2496
3150
|
const { t, i18n } = reactI18next.useTranslation();
|
|
2497
3151
|
const lang = i18n.language.split("-")[0] === "ru" ? "ru" : "en";
|
|
2498
|
-
const source =
|
|
3152
|
+
const source = item?.docsSnippet?.[lang] || item?.docsSnippet?.en || item?.docsSnippet?.ru || "";
|
|
2499
3153
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Drawer, { open: !!item, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Drawer.Content, { children: [
|
|
2500
3154
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Drawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Drawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
2501
3155
|
item && /* @__PURE__ */ jsxRuntime.jsx(IntegrationIcon, { src: iconSrc(item.icon), alt: item.label, size: "small" }),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item
|
|
3156
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item?.label })
|
|
2503
3157
|
] }) }) }),
|
|
2504
3158
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Drawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", children: source.trim() ? /* @__PURE__ */ jsxRuntime.jsx(Markdown, { source, truncatedLabel: t("integration.browse.install_truncated") }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "small", className: "text-ui-fg-subtle", children: t("integration.browse.install_empty") }) }),
|
|
2505
3159
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Drawer.Footer, { children: [
|
|
2506
3160
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Drawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: t("integration.actions.cancel") }) }),
|
|
2507
|
-
|
|
3161
|
+
item?.docsUrl && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "primary", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: item.docsUrl, target: "_blank", rel: "noopener noreferrer", children: [
|
|
2508
3162
|
t("integration.browse.install_docs"),
|
|
2509
3163
|
/* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpRightOnBox, {})
|
|
2510
3164
|
] }) })
|
|
@@ -2521,7 +3175,7 @@ const BrowsePage = () => {
|
|
|
2521
3175
|
queryKey: ["integration-catalog"],
|
|
2522
3176
|
queryFn: () => sdk.client.fetch("/admin/integrations/catalog")
|
|
2523
3177
|
});
|
|
2524
|
-
const items =
|
|
3178
|
+
const items = data?.integrations ?? [];
|
|
2525
3179
|
const categories = React.useMemo(() => [...new Set(items.map((i) => i.category))], [items]);
|
|
2526
3180
|
const q = search.trim().toLowerCase();
|
|
2527
3181
|
const filtered = items.filter((i) => {
|
|
@@ -2597,217 +3251,172 @@ const BrowseBreadcrumb = () => {
|
|
|
2597
3251
|
const handle = {
|
|
2598
3252
|
breadcrumb: () => /* @__PURE__ */ jsxRuntime.jsx(BrowseBreadcrumb, {})
|
|
2599
3253
|
};
|
|
2600
|
-
const integration$
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
browse: {
|
|
2616
|
-
title: "Browse",
|
|
2617
|
-
subtitle: "Find available integrations",
|
|
2618
|
-
publish: "Add Integration",
|
|
2619
|
-
learnMore: "Learn how to build and publish your own integration",
|
|
2620
|
-
searchPlaceholder: "Search integrations",
|
|
2621
|
-
by: "by {{author}}",
|
|
2622
|
-
installed: "Installed",
|
|
2623
|
-
notInstalled: "Not installed",
|
|
2624
|
-
add: "Add",
|
|
2625
|
-
settings: "Settings",
|
|
2626
|
-
install_docs: "Read docs",
|
|
2627
|
-
install_empty: "Setup instructions for this integration aren't available yet.",
|
|
2628
|
-
install_truncated: "These instructions are too long to show here — open the documentation."
|
|
2629
|
-
},
|
|
2630
|
-
columns: {
|
|
2631
|
-
integration: "Integration",
|
|
2632
|
-
description: "Description",
|
|
2633
|
-
category: "Category",
|
|
2634
|
-
status: "Status"
|
|
2635
|
-
},
|
|
2636
|
-
status: {
|
|
2637
|
-
notConfigured: "Not configured",
|
|
2638
|
-
incomplete: "Incomplete",
|
|
2639
|
-
enabled: "Enabled",
|
|
2640
|
-
disabled: "Disabled",
|
|
2641
|
-
configured: "Configured",
|
|
2642
|
-
connected: "Connected",
|
|
2643
|
-
connectionFailed: "Connection failed"
|
|
2644
|
-
},
|
|
2645
|
-
meta: {
|
|
2646
|
-
version: "v{{version}}",
|
|
2647
|
-
authorPrefix: "by"
|
|
2648
|
-
},
|
|
2649
|
-
labels: {
|
|
2650
|
-
category: "Category"
|
|
2651
|
-
},
|
|
2652
|
-
categories: {
|
|
2653
|
-
payment: "Payment",
|
|
2654
|
-
notification: "Notification",
|
|
2655
|
-
fulfillment: "Fulfillment",
|
|
2656
|
-
search: "Search",
|
|
2657
|
-
content: "Content",
|
|
2658
|
-
analytics: "Analytics",
|
|
2659
|
-
authentication: "Authentication",
|
|
2660
|
-
erp: "ERP",
|
|
2661
|
-
crm: "CRM",
|
|
2662
|
-
pim: "PIM",
|
|
2663
|
-
marketplace: "Marketplace",
|
|
2664
|
-
feed: "Feed",
|
|
2665
|
-
file_providers: "File providers",
|
|
2666
|
-
other: "Other"
|
|
2667
|
-
},
|
|
2668
|
-
actions: {
|
|
2669
|
-
test: "Test connection",
|
|
2670
|
-
enable: "Enable",
|
|
2671
|
-
disable: "Disable",
|
|
2672
|
-
"delete": "Delete",
|
|
2673
|
-
edit: "Edit",
|
|
2674
|
-
save: "Save",
|
|
2675
|
-
cancel: "Cancel"
|
|
2676
|
-
},
|
|
2677
|
-
"delete": {
|
|
2678
|
-
title: "Delete configuration",
|
|
2679
|
-
description: "Remove the stored configuration for {{name}}? This can't be undone."
|
|
2680
|
-
},
|
|
2681
|
-
form: {
|
|
2682
|
-
required: "{{field}} is required",
|
|
2683
|
-
invalidJson: "Invalid JSON",
|
|
2684
|
-
keepSecret: "•••••• – leave blank to keep",
|
|
2685
|
-
items: "{{count}} items"
|
|
2686
|
-
},
|
|
2687
|
-
toast: {
|
|
2688
|
-
saved: "Saved",
|
|
2689
|
-
saveFailed: "Save failed",
|
|
2690
|
-
connectionOk: "Connection OK",
|
|
2691
|
-
testFailed: "Test failed",
|
|
2692
|
-
enabled: "Enabled",
|
|
2693
|
-
disabled: "Disabled",
|
|
2694
|
-
deleted: "Configuration deleted",
|
|
2695
|
-
deleteFailed: "Delete failed",
|
|
2696
|
-
updateFailed: "Update failed"
|
|
2697
|
-
},
|
|
2698
|
-
unknown: 'Unknown integration "{{id}}".',
|
|
2699
|
-
back: "Back to integrations"
|
|
3254
|
+
const integration$w = { "list": { "title": "التكاملات", "subtitle": "إدارة إعدادات التكاملات", "browseIntegrations": "تصفح التكاملات", "learnMore": "تعرّف على كيفية إنشاء التكاملات", "searchPlaceholder": "البحث في التكاملات", "empty": "لا توجد تكاملات مسجلة. عرّف المزودين ضمن options.providers الخاصة بإضافة التكاملات في medusa-config.", "emptyFiltered": "لا توجد تكاملات مطابقة لعوامل التصفية.", "tested": "تم الاختبار", "testFailed": "فشل الاختبار", "tabs": { "all": "الكل" } }, "browse": { "title": "التصفح", "subtitle": "ابحث عن التكاملات المتاحة", "publish": "إضافة تكامل", "learnMore": "تعرّف على كيفية إنشاء ونشر تكاملك الخاص", "searchPlaceholder": "البحث في التكاملات", "by": "بواسطة {{author}}", "installed": "مثبَّت", "notInstalled": "غير مثبَّت", "add": "إضافة", "settings": "الإعدادات", "install_docs": "قراءة التوثيق", "install_empty": "تعليمات الإعداد لهذا التكامل غير متوفرة بعد.", "install_truncated": "هذه التعليمات أطول من أن تُعرض هنا — افتح التوثيق." }, "columns": { "integration": "التكامل", "description": "الوصف", "category": "الفئة", "status": "الحالة" }, "status": { "notConfigured": "غير مُهيّأ", "incomplete": "غير مكتمل", "enabled": "ممكّن", "disabled": "معطل", "configured": "مُهيّأ", "connected": "متصل", "connectionFailed": "فشل الاتصال" }, "meta": { "version": "v{{version}}", "authorPrefix": "بواسطة" }, "labels": { "category": "الفئة" }, "categories": { "payment": "الدفع", "notification": "الإشعارات", "fulfillment": "التنفيذ", "search": "البحث", "content": "المحتوى", "analytics": "التحليلات", "authentication": "المصادقة", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "الأسواق", "feed": "الخلاصات", "file_providers": "مزودو الملفات", "other": "أخرى" }, "actions": { "test": "اختبار الاتصال", "enable": "تمكين", "disable": "تعطيل", "delete": "حذف", "edit": "تحرير", "save": "حفظ", "cancel": "إلغاء" }, "delete": { "title": "حذف التهيئة", "description": "هل تريد إزالة التهيئة المحفوظة لـ {{name}}؟ لا يمكن التراجع عن هذا الإجراء." }, "form": { "required": "{{field}} مطلوب", "invalidJson": "JSON غير صالح", "keepSecret": "•••••• – اتركه فارغًا للإبقاء عليه", "items": "{{count}} عناصر" }, "toast": { "saved": "تم الحفظ", "saveFailed": "فشل الحفظ", "connectionOk": "الاتصال ناجح", "testFailed": "فشل الاختبار", "enabled": "تم التمكين", "disabled": "تم التعطيل", "deleted": "تم حذف التهيئة", "deleteFailed": "فشل الحذف", "updateFailed": "فشل التحديث" }, "unknown": 'تكامل غير معروف "{{id}}".', "back": "العودة إلى التكاملات" };
|
|
3255
|
+
const ar = {
|
|
3256
|
+
integration: integration$w
|
|
3257
|
+
};
|
|
3258
|
+
const integration$v = { "list": { "title": "Интеграции", "subtitle": "Управление на настройките на интеграциите", "browseIntegrations": "Разгледай интеграциите", "learnMore": "Научете как да създавате интеграции", "searchPlaceholder": "Търсене на интеграции", "empty": "Няма регистрирани интеграции. Декларирайте доставчици в options.providers на плъгина за интеграции в medusa-config.", "emptyFiltered": "Няма интеграции, отговарящи на филтрите.", "tested": "тествано", "testFailed": "тестът е неуспешен", "tabs": { "all": "Всички" } }, "browse": { "title": "Каталог", "subtitle": "Намерете налични интеграции", "publish": "Добавяне на интеграция", "learnMore": "Научете как да създадете и публикувате собствена интеграция", "searchPlaceholder": "Търсене на интеграции", "by": "от {{author}}", "installed": "Инсталирано", "notInstalled": "Не е инсталирано", "add": "Добави", "settings": "Настройки", "install_docs": "Прочети документацията", "install_empty": "Инструкциите за настройка на тази интеграция все още не са налични.", "install_truncated": "Инструкциите са твърде дълги, за да бъдат показани тук — отворете документацията." }, "columns": { "integration": "Интеграция", "description": "Описание", "category": "Категория", "status": "Статус" }, "status": { "notConfigured": "Не е конфигурирано", "incomplete": "Незавършено", "enabled": "Активирано", "disabled": "Деактивирано", "configured": "Конфигурирано", "connected": "Свързано", "connectionFailed": "Неуспешна връзка" }, "meta": { "version": "v{{version}}", "authorPrefix": "от" }, "labels": { "category": "Категория" }, "categories": { "payment": "Плащания", "notification": "Известия", "fulfillment": "Изпълнение", "search": "Търсене", "content": "Съдържание", "analytics": "Анализи", "authentication": "Удостоверяване", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Маркетплейс", "feed": "Фийдове", "file_providers": "Файлови доставчици", "other": "Други" }, "actions": { "test": "Тест на връзката", "enable": "Активирай", "disable": "Деактивирай", "delete": "Изтрий", "edit": "Редактирай", "save": "Запази", "cancel": "Отказ" }, "delete": { "title": "Изтриване на конфигурацията", "description": "Да се премахне ли запазената конфигурация за {{name}}? Това действие не може да бъде отменено." }, "form": { "required": "{{field}} е задължително", "invalidJson": "Невалиден JSON", "keepSecret": "•••••• – оставете празно, за да запазите", "items": "{{count}} елемента" }, "toast": { "saved": "Запазено", "saveFailed": "Неуспешно запазване", "connectionOk": "Връзката е успешна", "testFailed": "Тестът е неуспешен", "enabled": "Активирано", "disabled": "Деактивирано", "deleted": "Конфигурацията е изтрита", "deleteFailed": "Неуспешно изтриване", "updateFailed": "Неуспешно обновяване" }, "unknown": "Неизвестна интеграция „{{id}}“.", "back": "Назад към интеграциите" };
|
|
3259
|
+
const bg = {
|
|
3260
|
+
integration: integration$v
|
|
3261
|
+
};
|
|
3262
|
+
const integration$u = { "list": { "title": "Integracije", "subtitle": "Upravljanje postavkama integracija", "browseIntegrations": "Pregledaj integracije", "learnMore": "Saznajte kako izraditi integracije", "searchPlaceholder": "Pretraži integracije", "empty": "Nema registrovanih integracija. Deklarišite pružatelje u options.providers dodatka za integracije u medusa-config.", "emptyFiltered": "Nijedna integracija ne odgovara vašim filterima.", "tested": "testirano", "testFailed": "test nije uspio", "tabs": { "all": "Sve" } }, "browse": { "title": "Katalog", "subtitle": "Pronađite dostupne integracije", "publish": "Dodaj integraciju", "learnMore": "Saznajte kako izraditi i objaviti vlastitu integraciju", "searchPlaceholder": "Pretraži integracije", "by": "od {{author}}", "installed": "Instalirano", "notInstalled": "Nije instalirano", "add": "Dodaj", "settings": "Postavke", "install_docs": "Pročitaj dokumentaciju", "install_empty": "Upute za podešavanje ove integracije još nisu dostupne.", "install_truncated": "Ove upute su predugačke za prikaz ovdje — otvorite dokumentaciju." }, "columns": { "integration": "Integracija", "description": "Opis", "category": "Kategorija", "status": "Status" }, "status": { "notConfigured": "Nije konfigurisano", "incomplete": "Nepotpuno", "enabled": "Omogućeno", "disabled": "Onemogućeno", "configured": "Konfigurisano", "connected": "Povezano", "connectionFailed": "Povezivanje nije uspjelo" }, "meta": { "version": "v{{version}}", "authorPrefix": "od" }, "labels": { "category": "Kategorija" }, "categories": { "payment": "Plaćanja", "notification": "Obavijesti", "fulfillment": "Ispuna", "search": "Pretraga", "content": "Sadržaj", "analytics": "Analitika", "authentication": "Autentifikacija", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Tržnica", "feed": "Feedovi", "file_providers": "Pružatelji datoteka", "other": "Ostalo" }, "actions": { "test": "Testiraj vezu", "enable": "Omogući", "disable": "Onemogući", "delete": "Izbriši", "edit": "Uredi", "save": "Sačuvaj", "cancel": "Otkaži" }, "delete": { "title": "Brisanje konfiguracije", "description": "Ukloniti sačuvanu konfiguraciju za {{name}}? Ova radnja se ne može poništiti." }, "form": { "required": "{{field}} je obavezno", "invalidJson": "Neispravan JSON", "keepSecret": "•••••• – ostavite prazno da zadržite", "items": "{{count}} stavki" }, "toast": { "saved": "Sačuvano", "saveFailed": "Spremanje nije uspjelo", "connectionOk": "Veza uspostavljena", "testFailed": "Test nije uspio", "enabled": "Omogućeno", "disabled": "Onemogućeno", "deleted": "Konfiguracija izbrisana", "deleteFailed": "Brisanje nije uspjelo", "updateFailed": "Ažuriranje nije uspjelo" }, "unknown": 'Nepoznata integracija "{{id}}".', "back": "Nazad na integracije" };
|
|
3263
|
+
const bs = {
|
|
3264
|
+
integration: integration$u
|
|
3265
|
+
};
|
|
3266
|
+
const integration$t = { "list": { "title": "Integrace", "subtitle": "Správa nastavení integrací", "browseIntegrations": "Procházet integrace", "learnMore": "Zjistěte, jak vytvářet integrace", "searchPlaceholder": "Hledat integrace", "empty": "Nejsou registrovány žádné integrace. Deklarujte poskytovatele v options.providers pluginu integrací v medusa-config.", "emptyFiltered": "Žádné integrace neodpovídají vašim filtrům.", "tested": "otestováno", "testFailed": "test selhal", "tabs": { "all": "Vše" } }, "browse": { "title": "Katalog", "subtitle": "Najděte dostupné integrace", "publish": "Přidat integraci", "learnMore": "Zjistěte, jak vytvořit a publikovat vlastní integraci", "searchPlaceholder": "Hledat integrace", "by": "od {{author}}", "installed": "Nainstalováno", "notInstalled": "Nenainstalováno", "add": "Přidat", "settings": "Nastavení", "install_docs": "Přečíst dokumentaci", "install_empty": "Pokyny k nastavení této integrace zatím nejsou k dispozici.", "install_truncated": "Tyto pokyny jsou příliš dlouhé na zobrazení zde — otevřete dokumentaci." }, "columns": { "integration": "Integrace", "description": "Popis", "category": "Kategorie", "status": "Stav" }, "status": { "notConfigured": "Nenakonfigurováno", "incomplete": "Nedokončeno", "enabled": "Aktivní", "disabled": "Neaktivní", "configured": "Nakonfigurováno", "connected": "Připojeno", "connectionFailed": "Připojení selhalo" }, "meta": { "version": "v{{version}}", "authorPrefix": "od" }, "labels": { "category": "Kategorie" }, "categories": { "payment": "Platby", "notification": "Oznámení", "fulfillment": "Plnění", "search": "Vyhledávání", "content": "Obsah", "analytics": "Analytika", "authentication": "Ověřování", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Tržiště", "feed": "Feedy", "file_providers": "Poskytovatelé souborů", "other": "Ostatní" }, "actions": { "test": "Otestovat připojení", "enable": "Aktivovat", "disable": "Deaktivovat", "delete": "Smazat", "edit": "Upravit", "save": "Uložit", "cancel": "Zrušit" }, "delete": { "title": "Smazat konfiguraci", "description": "Odstranit uloženou konfiguraci pro {{name}}? Tuto akci nelze vrátit zpět." }, "form": { "required": "{{field}} je povinné", "invalidJson": "Neplatný JSON", "keepSecret": "•••••• – ponechte prázdné pro zachování", "items": "{{count}} položek" }, "toast": { "saved": "Uloženo", "saveFailed": "Uložení se nezdařilo", "connectionOk": "Připojení v pořádku", "testFailed": "Test se nezdařil", "enabled": "Aktivováno", "disabled": "Deaktivováno", "deleted": "Konfigurace smazána", "deleteFailed": "Smazání se nezdařilo", "updateFailed": "Aktualizace se nezdařila" }, "unknown": "Neznámá integrace „{{id}}“.", "back": "Zpět na integrace" };
|
|
3267
|
+
const cs = {
|
|
3268
|
+
integration: integration$t
|
|
2700
3269
|
};
|
|
3270
|
+
const integration$s = { "list": { "title": "Integrationen", "subtitle": "Integrationseinstellungen verwalten", "browseIntegrations": "Integrationen durchsuchen", "learnMore": "Erfahren Sie, wie Sie Integrationen erstellen", "searchPlaceholder": "Integrationen suchen", "empty": "Keine Integrationen registriert. Deklarieren Sie Anbieter unter options.providers des Integrations-Plugins in medusa-config.", "emptyFiltered": "Keine Integrationen entsprechen Ihren Filtern.", "tested": "getestet", "testFailed": "Test fehlgeschlagen", "tabs": { "all": "Alle" } }, "browse": { "title": "Katalog", "subtitle": "Verfügbare Integrationen finden", "publish": "Integration hinzufügen", "learnMore": "Erfahren Sie, wie Sie Ihre eigene Integration erstellen und veröffentlichen", "searchPlaceholder": "Integrationen suchen", "by": "von {{author}}", "installed": "Installiert", "notInstalled": "Nicht installiert", "add": "Hinzufügen", "settings": "Einstellungen", "install_docs": "Dokumentation lesen", "install_empty": "Für diese Integration sind noch keine Einrichtungsanweisungen verfügbar.", "install_truncated": "Diese Anweisungen sind zu lang für die Anzeige hier — öffnen Sie die Dokumentation." }, "columns": { "integration": "Integration", "description": "Beschreibung", "category": "Kategorie", "status": "Status" }, "status": { "notConfigured": "Nicht konfiguriert", "incomplete": "Unvollständig", "enabled": "Aktiviert", "disabled": "Deaktiviert", "configured": "Konfiguriert", "connected": "Verbunden", "connectionFailed": "Verbindung fehlgeschlagen" }, "meta": { "version": "v{{version}}", "authorPrefix": "von" }, "labels": { "category": "Kategorie" }, "categories": { "payment": "Zahlung", "notification": "Benachrichtigungen", "fulfillment": "Erfüllung", "search": "Suche", "content": "Inhalte", "analytics": "Analyse", "authentication": "Authentifizierung", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marktplatz", "feed": "Feeds", "file_providers": "Dateianbieter", "other": "Sonstiges" }, "actions": { "test": "Verbindung testen", "enable": "Aktivieren", "disable": "Deaktivieren", "delete": "Löschen", "edit": "Bearbeiten", "save": "Speichern", "cancel": "Abbrechen" }, "delete": { "title": "Konfiguration löschen", "description": "Die gespeicherte Konfiguration für {{name}} entfernen? Diese Aktion kann nicht rückgängig gemacht werden." }, "form": { "required": "{{field}} ist erforderlich", "invalidJson": "Ungültiges JSON", "keepSecret": "•••••• – leer lassen, um beizubehalten", "items": "{{count}} Elemente" }, "toast": { "saved": "Gespeichert", "saveFailed": "Speichern fehlgeschlagen", "connectionOk": "Verbindung OK", "testFailed": "Test fehlgeschlagen", "enabled": "Aktiviert", "disabled": "Deaktiviert", "deleted": "Konfiguration gelöscht", "deleteFailed": "Löschen fehlgeschlagen", "updateFailed": "Aktualisierung fehlgeschlagen" }, "unknown": "Unbekannte Integration „{{id}}“.", "back": "Zurück zu den Integrationen" };
|
|
3271
|
+
const de = {
|
|
3272
|
+
integration: integration$s
|
|
3273
|
+
};
|
|
3274
|
+
const integration$r = { "list": { "title": "Ενσωματώσεις", "subtitle": "Διαχείριση ρυθμίσεων ενσωματώσεων", "browseIntegrations": "Περιήγηση στις ενσωματώσεις", "learnMore": "Μάθετε πώς να δημιουργείτε ενσωματώσεις", "searchPlaceholder": "Αναζήτηση ενσωματώσεων", "empty": "Δεν έχουν καταχωρηθεί ενσωματώσεις. Δηλώστε παρόχους στο options.providers του πρόσθετου ενσωματώσεων στο medusa-config.", "emptyFiltered": "Καμία ενσωμάτωση δεν ταιριάζει με τα φίλτρα σας.", "tested": "ελέγχθηκε", "testFailed": "ο έλεγχος απέτυχε", "tabs": { "all": "Όλα" } }, "browse": { "title": "Κατάλογος", "subtitle": "Βρείτε διαθέσιμες ενσωματώσεις", "publish": "Προσθήκη ενσωμάτωσης", "learnMore": "Μάθετε πώς να δημιουργήσετε και να δημοσιεύσετε τη δική σας ενσωμάτωση", "searchPlaceholder": "Αναζήτηση ενσωματώσεων", "by": "από {{author}}", "installed": "Εγκατεστημένο", "notInstalled": "Μη εγκατεστημένο", "add": "Προσθήκη", "settings": "Ρυθμίσεις", "install_docs": "Διαβάστε την τεκμηρίωση", "install_empty": "Οι οδηγίες εγκατάστασης για αυτήν την ενσωμάτωση δεν είναι ακόμη διαθέσιμες.", "install_truncated": "Αυτές οι οδηγίες είναι πολύ μεγάλες για να εμφανιστούν εδώ — ανοίξτε την τεκμηρίωση." }, "columns": { "integration": "Ενσωμάτωση", "description": "Περιγραφή", "category": "Κατηγορία", "status": "Κατάσταση" }, "status": { "notConfigured": "Μη διαμορφωμένο", "incomplete": "Ημιτελές", "enabled": "Ενεργοποιημένο", "disabled": "Απενεργοποιημένο", "configured": "Διαμορφωμένο", "connected": "Συνδεδεμένο", "connectionFailed": "Η σύνδεση απέτυχε" }, "meta": { "version": "v{{version}}", "authorPrefix": "από" }, "labels": { "category": "Κατηγορία" }, "categories": { "payment": "Πληρωμές", "notification": "Ειδοποιήσεις", "fulfillment": "Εκπλήρωση", "search": "Αναζήτηση", "content": "Περιεχόμενο", "analytics": "Αναλυτικά στοιχεία", "authentication": "Έλεγχος ταυτότητας", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Αγορά", "feed": "Ροές", "file_providers": "Πάροχοι αρχείων", "other": "Άλλα" }, "actions": { "test": "Έλεγχος σύνδεσης", "enable": "Ενεργοποίηση", "disable": "Απενεργοποίηση", "delete": "Διαγραφή", "edit": "Επεξεργασία", "save": "Αποθήκευση", "cancel": "Ακύρωση" }, "delete": { "title": "Διαγραφή διαμόρφωσης", "description": "Κατάργηση της αποθηκευμένης διαμόρφωσης για {{name}}; Αυτή η ενέργεια δεν μπορεί να αναιρεθεί." }, "form": { "required": "Το πεδίο {{field}} είναι υποχρεωτικό", "invalidJson": "Μη έγκυρο JSON", "keepSecret": "•••••• – αφήστε το κενό για διατήρηση", "items": "{{count}} στοιχεία" }, "toast": { "saved": "Αποθηκεύτηκε", "saveFailed": "Η αποθήκευση απέτυχε", "connectionOk": "Η σύνδεση είναι εντάξει", "testFailed": "Ο έλεγχος απέτυχε", "enabled": "Ενεργοποιήθηκε", "disabled": "Απενεργοποιήθηκε", "deleted": "Η διαμόρφωση διαγράφηκε", "deleteFailed": "Η διαγραφή απέτυχε", "updateFailed": "Η ενημέρωση απέτυχε" }, "unknown": "Άγνωστη ενσωμάτωση «{{id}}».", "back": "Επιστροφή στις ενσωματώσεις" };
|
|
3275
|
+
const el = {
|
|
3276
|
+
integration: integration$r
|
|
3277
|
+
};
|
|
3278
|
+
const integration$q = { "list": { "title": "Integrations", "subtitle": "Manage integrations settings", "browseIntegrations": "Browse Integrations", "learnMore": "Learn how to build integrations", "searchPlaceholder": "Search integrations", "empty": "No integrations registered. Declare providers under the integration plugin's options.providers in medusa-config.", "emptyFiltered": "No integrations match your filters.", "tested": "tested", "testFailed": "test failed", "tabs": { "all": "All" } }, "browse": { "title": "Browse", "subtitle": "Find available integrations", "publish": "Add Integration", "learnMore": "Learn how to build and publish your own integration", "searchPlaceholder": "Search integrations", "by": "by {{author}}", "installed": "Installed", "notInstalled": "Not installed", "add": "Add", "settings": "Settings", "install_docs": "Read docs", "install_empty": "Setup instructions for this integration aren't available yet.", "install_truncated": "These instructions are too long to show here — open the documentation." }, "columns": { "integration": "Integration", "description": "Description", "category": "Category", "status": "Status" }, "status": { "notConfigured": "Not configured", "incomplete": "Incomplete", "enabled": "Enabled", "disabled": "Disabled", "configured": "Configured", "connected": "Connected", "connectionFailed": "Connection failed" }, "meta": { "version": "v{{version}}", "authorPrefix": "by" }, "labels": { "category": "Category" }, "categories": { "payment": "Payment", "notification": "Notification", "fulfillment": "Fulfillment", "search": "Search", "content": "Content", "analytics": "Analytics", "authentication": "Authentication", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feed", "file_providers": "File providers", "other": "Other" }, "actions": { "test": "Test connection", "enable": "Enable", "disable": "Disable", "delete": "Delete", "edit": "Edit", "save": "Save", "cancel": "Cancel" }, "delete": { "title": "Delete configuration", "description": "Remove the stored configuration for {{name}}? This can't be undone." }, "form": { "required": "{{field}} is required", "invalidJson": "Invalid JSON", "keepSecret": "•••••• – leave blank to keep", "items": "{{count}} items" }, "toast": { "saved": "Saved", "saveFailed": "Save failed", "connectionOk": "Connection OK", "testFailed": "Test failed", "enabled": "Enabled", "disabled": "Disabled", "deleted": "Configuration deleted", "deleteFailed": "Delete failed", "updateFailed": "Update failed" }, "unknown": 'Unknown integration "{{id}}".', "back": "Back to integrations" };
|
|
2701
3279
|
const en = {
|
|
2702
|
-
integration: integration$
|
|
3280
|
+
integration: integration$q
|
|
3281
|
+
};
|
|
3282
|
+
const integration$p = { "list": { "title": "Integrations", "subtitle": "Manage integrations settings", "browseIntegrations": "Browse Integrations", "learnMore": "Learn how to build integrations", "searchPlaceholder": "Search integrations", "empty": "No integrations registered. Declare providers under the integration plugin's options.providers in medusa-config.", "emptyFiltered": "No integrations match your filters.", "tested": "tested", "testFailed": "test failed", "tabs": { "all": "All" } }, "browse": { "title": "Browse", "subtitle": "Find available integrations", "publish": "Add Integration", "learnMore": "Learn how to build and publish your own integration", "searchPlaceholder": "Search integrations", "by": "by {{author}}", "installed": "Installed", "notInstalled": "Not installed", "add": "Add", "settings": "Settings", "install_docs": "Read docs", "install_empty": "Setup instructions for this integration aren't available yet.", "install_truncated": "These instructions are too long to show here — open the documentation." }, "columns": { "integration": "Integration", "description": "Description", "category": "Category", "status": "Status" }, "status": { "notConfigured": "Not configured", "incomplete": "Incomplete", "enabled": "Enabled", "disabled": "Disabled", "configured": "Configured", "connected": "Connected", "connectionFailed": "Connection failed" }, "meta": { "version": "v{{version}}", "authorPrefix": "by" }, "labels": { "category": "Category" }, "categories": { "payment": "Payment", "notification": "Notification", "fulfillment": "Fulfilment", "search": "Search", "content": "Content", "analytics": "Analytics", "authentication": "Authentication", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feed", "file_providers": "File providers", "other": "Other" }, "actions": { "test": "Test connection", "enable": "Enable", "disable": "Disable", "delete": "Delete", "edit": "Edit", "save": "Save", "cancel": "Cancel" }, "delete": { "title": "Delete configuration", "description": "Remove the stored configuration for {{name}}? This can't be undone." }, "form": { "required": "{{field}} is required", "invalidJson": "Invalid JSON", "keepSecret": "•••••• – leave blank to keep", "items": "{{count}} items" }, "toast": { "saved": "Saved", "saveFailed": "Save failed", "connectionOk": "Connection OK", "testFailed": "Test failed", "enabled": "Enabled", "disabled": "Disabled", "deleted": "Configuration deleted", "deleteFailed": "Delete failed", "updateFailed": "Update failed" }, "unknown": 'Unknown integration "{{id}}".', "back": "Back to integrations" };
|
|
3283
|
+
const enGB = {
|
|
3284
|
+
integration: integration$p
|
|
3285
|
+
};
|
|
3286
|
+
const integration$o = { "list": { "title": "Integraciones", "subtitle": "Gestiona la configuración de las integraciones", "browseIntegrations": "Explorar integraciones", "learnMore": "Aprende a crear integraciones", "searchPlaceholder": "Buscar integraciones", "empty": "No hay integraciones registradas. Declara los proveedores en options.providers del plugin de integraciones en medusa-config.", "emptyFiltered": "Ninguna integración coincide con tus filtros.", "tested": "probado", "testFailed": "prueba fallida", "tabs": { "all": "Todas" } }, "browse": { "title": "Catálogo", "subtitle": "Encuentra integraciones disponibles", "publish": "Añadir integración", "learnMore": "Aprende a crear y publicar tu propia integración", "searchPlaceholder": "Buscar integraciones", "by": "por {{author}}", "installed": "Instalado", "notInstalled": "No instalado", "add": "Añadir", "settings": "Configuración", "install_docs": "Leer documentación", "install_empty": "Las instrucciones de configuración de esta integración aún no están disponibles.", "install_truncated": "Estas instrucciones son demasiado largas para mostrarlas aquí — abre la documentación." }, "columns": { "integration": "Integración", "description": "Descripción", "category": "Categoría", "status": "Estado" }, "status": { "notConfigured": "Sin configurar", "incomplete": "Incompleto", "enabled": "Habilitado", "disabled": "Deshabilitado", "configured": "Configurado", "connected": "Conectado", "connectionFailed": "Error de conexión" }, "meta": { "version": "v{{version}}", "authorPrefix": "por" }, "labels": { "category": "Categoría" }, "categories": { "payment": "Pagos", "notification": "Notificaciones", "fulfillment": "Cumplimiento", "search": "Búsqueda", "content": "Contenido", "analytics": "Analíticas", "authentication": "Autenticación", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feeds", "file_providers": "Proveedores de archivos", "other": "Otros" }, "actions": { "test": "Probar conexión", "enable": "Habilitar", "disable": "Deshabilitar", "delete": "Eliminar", "edit": "Editar", "save": "Guardar", "cancel": "Cancelar" }, "delete": { "title": "Eliminar configuración", "description": "¿Eliminar la configuración guardada de {{name}}? Esta acción no puede deshacerse." }, "form": { "required": "{{field}} es obligatorio", "invalidJson": "JSON no válido", "keepSecret": "•••••• – déjalo en blanco para mantenerlo", "items": "{{count}} elementos" }, "toast": { "saved": "Guardado", "saveFailed": "No se pudo guardar", "connectionOk": "Conexión correcta", "testFailed": "La prueba falló", "enabled": "Habilitado", "disabled": "Deshabilitado", "deleted": "Configuración eliminada", "deleteFailed": "No se pudo eliminar", "updateFailed": "No se pudo actualizar" }, "unknown": "Integración desconocida «{{id}}».", "back": "Volver a integraciones" };
|
|
3287
|
+
const es = {
|
|
3288
|
+
integration: integration$o
|
|
3289
|
+
};
|
|
3290
|
+
const integration$n = { "list": { "title": "یکپارچهسازیها", "subtitle": "مدیریت تنظیمات یکپارچهسازیها", "browseIntegrations": "مرور یکپارچهسازیها", "learnMore": "بیاموزید چگونه یکپارچهسازی بسازید", "searchPlaceholder": "جستجوی یکپارچهسازیها", "empty": "هیچ یکپارچهسازی ثبت نشده است. ارائهدهندگان را در options.providers افزونه یکپارچهسازی در medusa-config تعریف کنید.", "emptyFiltered": "هیچ یکپارچهسازی با فیلترهای شما مطابقت ندارد.", "tested": "آزمایش شد", "testFailed": "آزمایش ناموفق بود", "tabs": { "all": "همه" } }, "browse": { "title": "مرور", "subtitle": "یکپارچهسازیهای موجود را پیدا کنید", "publish": "افزودن یکپارچهسازی", "learnMore": "بیاموزید چگونه یکپارچهسازی خود را بسازید و منتشر کنید", "searchPlaceholder": "جستجوی یکپارچهسازیها", "by": "توسط {{author}}", "installed": "نصبشده", "notInstalled": "نصب نشده", "add": "افزودن", "settings": "تنظیمات", "install_docs": "خواندن مستندات", "install_empty": "دستورالعمل راهاندازی این یکپارچهسازی هنوز در دسترس نیست.", "install_truncated": "این دستورالعمل برای نمایش در اینجا بسیار طولانی است — مستندات را باز کنید." }, "columns": { "integration": "یکپارچهسازی", "description": "توضیحات", "category": "دستهبندی", "status": "وضعیت" }, "status": { "notConfigured": "پیکربندی نشده", "incomplete": "ناقص", "enabled": "فعال", "disabled": "غیرفعال", "configured": "پیکربندی شده", "connected": "متصل", "connectionFailed": "اتصال ناموفق بود" }, "meta": { "version": "v{{version}}", "authorPrefix": "توسط" }, "labels": { "category": "دستهبندی" }, "categories": { "payment": "پرداخت", "notification": "اعلانها", "fulfillment": "پردازش سفارش", "search": "جستجو", "content": "محتوا", "analytics": "تحلیلها", "authentication": "احراز هویت", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "بازارگاه", "feed": "فیدها", "file_providers": "ارائهدهندگان فایل", "other": "سایر" }, "actions": { "test": "آزمایش اتصال", "enable": "فعال کردن", "disable": "غیرفعال کردن", "delete": "حذف", "edit": "ویرایش", "save": "ذخیره", "cancel": "لغو" }, "delete": { "title": "حذف پیکربندی", "description": "پیکربندی ذخیرهشده برای {{name}} حذف شود؟ این عمل قابل بازگشت نیست." }, "form": { "required": "{{field}} الزامی است", "invalidJson": "JSON نامعتبر", "keepSecret": "•••••• – برای حفظ مقدار خالی بگذارید", "items": "{{count}} مورد" }, "toast": { "saved": "ذخیره شد", "saveFailed": "ذخیرهسازی ناموفق بود", "connectionOk": "اتصال برقرار است", "testFailed": "آزمایش ناموفق بود", "enabled": "فعال شد", "disabled": "غیرفعال شد", "deleted": "پیکربندی حذف شد", "deleteFailed": "حذف ناموفق بود", "updateFailed": "بهروزرسانی ناموفق بود" }, "unknown": "یکپارچهسازی ناشناخته «{{id}}».", "back": "بازگشت به یکپارچهسازیها" };
|
|
3291
|
+
const fa = {
|
|
3292
|
+
integration: integration$n
|
|
3293
|
+
};
|
|
3294
|
+
const integration$m = { "list": { "title": "Intégrations", "subtitle": "Gérer les paramètres des intégrations", "browseIntegrations": "Parcourir les intégrations", "learnMore": "Découvrez comment créer des intégrations", "searchPlaceholder": "Rechercher des intégrations", "empty": "Aucune intégration enregistrée. Déclarez les fournisseurs dans options.providers du plugin d'intégrations dans medusa-config.", "emptyFiltered": "Aucune intégration ne correspond à vos filtres.", "tested": "testé", "testFailed": "échec du test", "tabs": { "all": "Toutes" } }, "browse": { "title": "Catalogue", "subtitle": "Trouvez les intégrations disponibles", "publish": "Ajouter une intégration", "learnMore": "Découvrez comment créer et publier votre propre intégration", "searchPlaceholder": "Rechercher des intégrations", "by": "par {{author}}", "installed": "Installé", "notInstalled": "Non installé", "add": "Ajouter", "settings": "Paramètres", "install_docs": "Lire la documentation", "install_empty": "Les instructions de configuration de cette intégration ne sont pas encore disponibles.", "install_truncated": "Ces instructions sont trop longues pour être affichées ici — ouvrez la documentation." }, "columns": { "integration": "Intégration", "description": "Description", "category": "Catégorie", "status": "Statut" }, "status": { "notConfigured": "Non configuré", "incomplete": "Incomplet", "enabled": "Activé", "disabled": "Désactivé", "configured": "Configuré", "connected": "Connecté", "connectionFailed": "Échec de la connexion" }, "meta": { "version": "v{{version}}", "authorPrefix": "par" }, "labels": { "category": "Catégorie" }, "categories": { "payment": "Paiement", "notification": "Notifications", "fulfillment": "Livraison", "search": "Recherche", "content": "Contenu", "analytics": "Analytique", "authentication": "Authentification", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Flux", "file_providers": "Fournisseurs de fichiers", "other": "Autres" }, "actions": { "test": "Tester la connexion", "enable": "Activer", "disable": "Désactiver", "delete": "Supprimer", "edit": "Modifier", "save": "Enregistrer", "cancel": "Annuler" }, "delete": { "title": "Supprimer la configuration", "description": "Supprimer la configuration enregistrée pour {{name}} ? Cette action ne peut être annulée." }, "form": { "required": "{{field}} est requis", "invalidJson": "JSON invalide", "keepSecret": "•••••• – laissez vide pour conserver", "items": "{{count}} éléments" }, "toast": { "saved": "Enregistré", "saveFailed": "Échec de l'enregistrement", "connectionOk": "Connexion OK", "testFailed": "Échec du test", "enabled": "Activé", "disabled": "Désactivé", "deleted": "Configuration supprimée", "deleteFailed": "Échec de la suppression", "updateFailed": "Échec de la mise à jour" }, "unknown": "Intégration inconnue « {{id}} ».", "back": "Retour aux intégrations" };
|
|
3295
|
+
const fr = {
|
|
3296
|
+
integration: integration$m
|
|
3297
|
+
};
|
|
3298
|
+
const integration$l = { "list": { "title": "אינטגרציות", "subtitle": "ניהול הגדרות האינטגרציות", "browseIntegrations": "עיון באינטגרציות", "learnMore": "למדו כיצד לבנות אינטגרציות", "searchPlaceholder": "חיפוש אינטגרציות", "empty": "לא רשומות אינטגרציות. הגדירו ספקים תחת options.providers של תוסף האינטגרציות ב-medusa-config.", "emptyFiltered": "אין אינטגרציות התואמות את הסינון שלך.", "tested": "נבדק", "testFailed": "הבדיקה נכשלה", "tabs": { "all": "הכל" } }, "browse": { "title": "קטלוג", "subtitle": "מצאו אינטגרציות זמינות", "publish": "הוספת אינטגרציה", "learnMore": "למדו כיצד לבנות ולפרסם אינטגרציה משלכם", "searchPlaceholder": "חיפוש אינטגרציות", "by": "על ידי {{author}}", "installed": "מותקן", "notInstalled": "לא מותקן", "add": "הוסף", "settings": "הגדרות", "install_docs": "קרא את התיעוד", "install_empty": "הוראות ההתקנה עבור אינטגרציה זו אינן זמינות עדיין.", "install_truncated": "ההוראות ארוכות מדי להצגה כאן — פתחו את התיעוד." }, "columns": { "integration": "אינטגרציה", "description": "תיאור", "category": "קטגוריה", "status": "סטטוס" }, "status": { "notConfigured": "לא מוגדר", "incomplete": "לא הושלם", "enabled": "מופעל", "disabled": "מושבת", "configured": "מוגדר", "connected": "מחובר", "connectionFailed": "החיבור נכשל" }, "meta": { "version": "v{{version}}", "authorPrefix": "על ידי" }, "labels": { "category": "קטגוריה" }, "categories": { "payment": "תשלומים", "notification": "התראות", "fulfillment": "מימוש", "search": "חיפוש", "content": "תוכן", "analytics": "אנליטיקה", "authentication": "אימות", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "זירת מסחר", "feed": "פידים", "file_providers": "ספקי קבצים", "other": "אחר" }, "actions": { "test": "בדיקת חיבור", "enable": "הפעל", "disable": "השבת", "delete": "מחק", "edit": "ערוך", "save": "שמור", "cancel": "בטל" }, "delete": { "title": "מחיקת תצורה", "description": "להסיר את התצורה השמורה עבור {{name}}? פעולה זו אינה ניתנת לביטול." }, "form": { "required": "{{field}} הוא שדה חובה", "invalidJson": "JSON לא תקין", "keepSecret": "•••••• – השאירו ריק כדי לשמור", "items": "{{count}} פריטים" }, "toast": { "saved": "נשמר", "saveFailed": "השמירה נכשלה", "connectionOk": "החיבור תקין", "testFailed": "הבדיקה נכשלה", "enabled": "הופעל", "disabled": "הושבת", "deleted": "התצורה נמחקה", "deleteFailed": "המחיקה נכשלה", "updateFailed": "העדכון נכשל" }, "unknown": 'אינטגרציה לא ידועה "{{id}}".', "back": "חזרה לאינטגרציות" };
|
|
3299
|
+
const he = {
|
|
3300
|
+
integration: integration$l
|
|
3301
|
+
};
|
|
3302
|
+
const integration$k = { "list": { "title": "Integracije", "subtitle": "Upravljanje postavkama integracija", "browseIntegrations": "Pregledaj integracije", "learnMore": "Saznajte kako izraditi integracije", "searchPlaceholder": "Pretraži integracije", "empty": "Nema registriranih integracija. Deklarirajte pružatelje u options.providers dodatka za integracije u medusa-config.", "emptyFiltered": "Nijedna integracija ne odgovara vašim filtrima.", "tested": "testirano", "testFailed": "test nije uspio", "tabs": { "all": "Sve" } }, "browse": { "title": "Katalog", "subtitle": "Pronađite dostupne integracije", "publish": "Dodaj integraciju", "learnMore": "Saznajte kako izraditi i objaviti vlastitu integraciju", "searchPlaceholder": "Pretraži integracije", "by": "od {{author}}", "installed": "Instalirano", "notInstalled": "Nije instalirano", "add": "Dodaj", "settings": "Postavke", "install_docs": "Pročitaj dokumentaciju", "install_empty": "Upute za postavljanje ove integracije još nisu dostupne.", "install_truncated": "Ove su upute predugačke za prikaz ovdje — otvorite dokumentaciju." }, "columns": { "integration": "Integracija", "description": "Opis", "category": "Kategorija", "status": "Status" }, "status": { "notConfigured": "Nije konfigurirano", "incomplete": "Nepotpuno", "enabled": "Omogućeno", "disabled": "Onemogućeno", "configured": "Konfigurirano", "connected": "Povezano", "connectionFailed": "Povezivanje nije uspjelo" }, "meta": { "version": "v{{version}}", "authorPrefix": "od" }, "labels": { "category": "Kategorija" }, "categories": { "payment": "Plaćanja", "notification": "Obavijesti", "fulfillment": "Otprema", "search": "Pretraga", "content": "Sadržaj", "analytics": "Analitika", "authentication": "Autentifikacija", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Tržnica", "feed": "Feedovi", "file_providers": "Pružatelji datoteka", "other": "Ostalo" }, "actions": { "test": "Testiraj vezu", "enable": "Omogući", "disable": "Onemogući", "delete": "Izbriši", "edit": "Uredi", "save": "Spremi", "cancel": "Otkaži" }, "delete": { "title": "Brisanje konfiguracije", "description": "Ukloniti spremljenu konfiguraciju za {{name}}? Ovu radnju nije moguće poništiti." }, "form": { "required": "{{field}} je obavezno", "invalidJson": "Neispravan JSON", "keepSecret": "•••••• – ostavite prazno za zadržavanje", "items": "{{count}} stavki" }, "toast": { "saved": "Spremljeno", "saveFailed": "Spremanje nije uspjelo", "connectionOk": "Veza uspostavljena", "testFailed": "Test nije uspio", "enabled": "Omogućeno", "disabled": "Onemogućeno", "deleted": "Konfiguracija izbrisana", "deleteFailed": "Brisanje nije uspjelo", "updateFailed": "Ažuriranje nije uspjelo" }, "unknown": 'Nepoznata integracija "{{id}}".', "back": "Natrag na integracije" };
|
|
3303
|
+
const hr = {
|
|
3304
|
+
integration: integration$k
|
|
3305
|
+
};
|
|
3306
|
+
const integration$j = { "list": { "title": "Integrációk", "subtitle": "Integrációk beállításainak kezelése", "browseIntegrations": "Integrációk böngészése", "learnMore": "Ismerje meg, hogyan készíthet integrációkat", "searchPlaceholder": "Integrációk keresése", "empty": "Nincsenek regisztrált integrációk. Adja meg a szolgáltatókat az integrációs bővítmény options.providers beállításában a medusa-config fájlban.", "emptyFiltered": "Egyetlen integráció sem felel meg a szűrőknek.", "tested": "tesztelve", "testFailed": "a teszt sikertelen", "tabs": { "all": "Összes" } }, "browse": { "title": "Katalógus", "subtitle": "Találjon elérhető integrációkat", "publish": "Integráció hozzáadása", "learnMore": "Ismerje meg, hogyan készítheti el és teheti közzé saját integrációját", "searchPlaceholder": "Integrációk keresése", "by": "{{author}} által", "installed": "Telepítve", "notInstalled": "Nincs telepítve", "add": "Hozzáadás", "settings": "Beállítások", "install_docs": "Dokumentáció olvasása", "install_empty": "Ehhez az integrációhoz még nem érhető el beállítási útmutató.", "install_truncated": "Ez az útmutató túl hosszú ahhoz, hogy itt megjelenjen — nyissa meg a dokumentációt." }, "columns": { "integration": "Integráció", "description": "Leírás", "category": "Kategória", "status": "Státusz" }, "status": { "notConfigured": "Nincs konfigurálva", "incomplete": "Befejezetlen", "enabled": "Engedélyezve", "disabled": "Letiltva", "configured": "Konfigurálva", "connected": "Csatlakoztatva", "connectionFailed": "A kapcsolódás sikertelen" }, "meta": { "version": "v{{version}}", "authorPrefix": "készítette:" }, "labels": { "category": "Kategória" }, "categories": { "payment": "Fizetés", "notification": "Értesítések", "fulfillment": "Teljesítés", "search": "Keresés", "content": "Tartalom", "analytics": "Analitika", "authentication": "Hitelesítés", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Piactér", "feed": "Hírcsatornák", "file_providers": "Fájlszolgáltatók", "other": "Egyéb" }, "actions": { "test": "Kapcsolat tesztelése", "enable": "Engedélyezés", "disable": "Letiltás", "delete": "Törlés", "edit": "Szerkesztés", "save": "Mentés", "cancel": "Mégse" }, "delete": { "title": "Konfiguráció törlése", "description": "Eltávolítja a(z) {{name}} mentett konfigurációját? Ez a művelet nem vonható vissza." }, "form": { "required": "A(z) {{field}} megadása kötelező", "invalidJson": "Érvénytelen JSON", "keepSecret": "•••••• – hagyja üresen a megtartáshoz", "items": "{{count}} elem" }, "toast": { "saved": "Mentve", "saveFailed": "A mentés sikertelen", "connectionOk": "A kapcsolat rendben", "testFailed": "A teszt sikertelen", "enabled": "Engedélyezve", "disabled": "Letiltva", "deleted": "Konfiguráció törölve", "deleteFailed": "A törlés sikertelen", "updateFailed": "A frissítés sikertelen" }, "unknown": "Ismeretlen integráció: „{{id}}”.", "back": "Vissza az integrációkhoz" };
|
|
3307
|
+
const hu = {
|
|
3308
|
+
integration: integration$j
|
|
3309
|
+
};
|
|
3310
|
+
const integration$i = { "list": { "title": "Integrasi", "subtitle": "Kelola pengaturan integrasi", "browseIntegrations": "Jelajahi integrasi", "learnMore": "Pelajari cara membangun integrasi", "searchPlaceholder": "Cari integrasi", "empty": "Tidak ada integrasi yang terdaftar. Deklarasikan penyedia di options.providers plugin integrasi pada medusa-config.", "emptyFiltered": "Tidak ada integrasi yang cocok dengan filter Anda.", "tested": "teruji", "testFailed": "pengujian gagal", "tabs": { "all": "Semua" } }, "browse": { "title": "Katalog", "subtitle": "Temukan integrasi yang tersedia", "publish": "Tambah integrasi", "learnMore": "Pelajari cara membangun dan memublikasikan integrasi Anda sendiri", "searchPlaceholder": "Cari integrasi", "by": "oleh {{author}}", "installed": "Terpasang", "notInstalled": "Belum terpasang", "add": "Tambah", "settings": "Pengaturan", "install_docs": "Baca dokumentasi", "install_empty": "Petunjuk penyiapan untuk integrasi ini belum tersedia.", "install_truncated": "Petunjuk ini terlalu panjang untuk ditampilkan di sini — buka dokumentasinya." }, "columns": { "integration": "Integrasi", "description": "Deskripsi", "category": "Kategori", "status": "Status" }, "status": { "notConfigured": "Belum dikonfigurasi", "incomplete": "Belum lengkap", "enabled": "Diaktifkan", "disabled": "Dinonaktifkan", "configured": "Terkonfigurasi", "connected": "Terhubung", "connectionFailed": "Koneksi gagal" }, "meta": { "version": "v{{version}}", "authorPrefix": "oleh" }, "labels": { "category": "Kategori" }, "categories": { "payment": "Pembayaran", "notification": "Notifikasi", "fulfillment": "Pemenuhan", "search": "Pencarian", "content": "Konten", "analytics": "Analitik", "authentication": "Autentikasi", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feed", "file_providers": "Penyedia file", "other": "Lainnya" }, "actions": { "test": "Uji koneksi", "enable": "Aktifkan", "disable": "Nonaktifkan", "delete": "Hapus", "edit": "Edit", "save": "Simpan", "cancel": "Batal" }, "delete": { "title": "Hapus konfigurasi", "description": "Hapus konfigurasi tersimpan untuk {{name}}? Tindakan ini tidak dapat dibatalkan." }, "form": { "required": "{{field}} wajib diisi", "invalidJson": "JSON tidak valid", "keepSecret": "•••••• – biarkan kosong untuk mempertahankan", "items": "{{count}} item" }, "toast": { "saved": "Tersimpan", "saveFailed": "Gagal menyimpan", "connectionOk": "Koneksi berhasil", "testFailed": "Pengujian gagal", "enabled": "Diaktifkan", "disabled": "Dinonaktifkan", "deleted": "Konfigurasi dihapus", "deleteFailed": "Gagal menghapus", "updateFailed": "Gagal memperbarui" }, "unknown": 'Integrasi tidak dikenal "{{id}}".', "back": "Kembali ke integrasi" };
|
|
3311
|
+
const id = {
|
|
3312
|
+
integration: integration$i
|
|
3313
|
+
};
|
|
3314
|
+
const integration$h = { "list": { "title": "Integrazioni", "subtitle": "Gestisci le impostazioni delle integrazioni", "browseIntegrations": "Esplora le integrazioni", "learnMore": "Scopri come creare integrazioni", "searchPlaceholder": "Cerca integrazioni", "empty": "Nessuna integrazione registrata. Dichiara i fornitori in options.providers del plugin integrazioni in medusa-config.", "emptyFiltered": "Nessuna integrazione corrisponde ai filtri.", "tested": "testato", "testFailed": "test fallito", "tabs": { "all": "Tutte" } }, "browse": { "title": "Catalogo", "subtitle": "Trova le integrazioni disponibili", "publish": "Aggiungi integrazione", "learnMore": "Scopri come creare e pubblicare la tua integrazione", "searchPlaceholder": "Cerca integrazioni", "by": "di {{author}}", "installed": "Installato", "notInstalled": "Non installato", "add": "Aggiungi", "settings": "Impostazioni", "install_docs": "Leggi la documentazione", "install_empty": "Le istruzioni di configurazione per questa integrazione non sono ancora disponibili.", "install_truncated": "Queste istruzioni sono troppo lunghe per essere mostrate qui — apri la documentazione." }, "columns": { "integration": "Integrazione", "description": "Descrizione", "category": "Categoria", "status": "Stato" }, "status": { "notConfigured": "Non configurato", "incomplete": "Incompleto", "enabled": "Abilitato", "disabled": "Disabilitato", "configured": "Configurato", "connected": "Connesso", "connectionFailed": "Connessione non riuscita" }, "meta": { "version": "v{{version}}", "authorPrefix": "di" }, "labels": { "category": "Categoria" }, "categories": { "payment": "Pagamenti", "notification": "Notifiche", "fulfillment": "Evasione", "search": "Ricerca", "content": "Contenuti", "analytics": "Analisi", "authentication": "Autenticazione", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feed", "file_providers": "Fornitori di file", "other": "Altro" }, "actions": { "test": "Testa connessione", "enable": "Abilita", "disable": "Disabilita", "delete": "Elimina", "edit": "Modifica", "save": "Salva", "cancel": "Annulla" }, "delete": { "title": "Elimina configurazione", "description": "Rimuovere la configurazione salvata per {{name}}? Questa azione non può essere annullata." }, "form": { "required": "{{field}} è obbligatorio", "invalidJson": "JSON non valido", "keepSecret": "•••••• – lascia vuoto per mantenere", "items": "{{count}} elementi" }, "toast": { "saved": "Salvato", "saveFailed": "Salvataggio non riuscito", "connectionOk": "Connessione OK", "testFailed": "Test non riuscito", "enabled": "Abilitato", "disabled": "Disabilitato", "deleted": "Configurazione eliminata", "deleteFailed": "Eliminazione non riuscita", "updateFailed": "Aggiornamento non riuscito" }, "unknown": "Integrazione sconosciuta «{{id}}».", "back": "Torna alle integrazioni" };
|
|
3315
|
+
const it = {
|
|
3316
|
+
integration: integration$h
|
|
2703
3317
|
};
|
|
2704
|
-
const integration = {
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
subtitle: "Управление настройками интеграций",
|
|
2708
|
-
browseIntegrations: "Найти интеграции",
|
|
2709
|
-
learnMore: "Как создавать интеграции",
|
|
2710
|
-
searchPlaceholder: "Поиск интеграций",
|
|
2711
|
-
empty: "Нет зарегистрированных интеграций. Объявите провайдеров в options.providers плагина интеграций в medusa-config.",
|
|
2712
|
-
emptyFiltered: "Нет интеграций по заданным фильтрам",
|
|
2713
|
-
tested: "проверено",
|
|
2714
|
-
testFailed: "ошибка проверки",
|
|
2715
|
-
tabs: {
|
|
2716
|
-
all: "Все"
|
|
2717
|
-
}
|
|
2718
|
-
},
|
|
2719
|
-
browse: {
|
|
2720
|
-
title: "Каталог",
|
|
2721
|
-
subtitle: "Поиск доступных интеграций",
|
|
2722
|
-
publish: "Добавить интеграцию",
|
|
2723
|
-
learnMore: "Как создать и опубликовать свою интеграцию",
|
|
2724
|
-
searchPlaceholder: "Поиск интеграций",
|
|
2725
|
-
by: "от {{author}}",
|
|
2726
|
-
installed: "Установлено",
|
|
2727
|
-
notInstalled: "Не установлено",
|
|
2728
|
-
add: "Добавить",
|
|
2729
|
-
settings: "Настройки",
|
|
2730
|
-
install_docs: "Читать документацию",
|
|
2731
|
-
install_empty: "Инструкция по настройке для этой интеграции пока недоступна.",
|
|
2732
|
-
install_truncated: "Инструкция слишком длинная для показа здесь — откройте документацию."
|
|
2733
|
-
},
|
|
2734
|
-
columns: {
|
|
2735
|
-
integration: "Интеграция",
|
|
2736
|
-
description: "Описание",
|
|
2737
|
-
category: "Категория",
|
|
2738
|
-
status: "Статус"
|
|
2739
|
-
},
|
|
2740
|
-
status: {
|
|
2741
|
-
notConfigured: "Не настроено",
|
|
2742
|
-
incomplete: "Не завершено",
|
|
2743
|
-
enabled: "Включено",
|
|
2744
|
-
disabled: "Выключено",
|
|
2745
|
-
configured: "Настроено",
|
|
2746
|
-
connected: "Подключено",
|
|
2747
|
-
connectionFailed: "Ошибка подключения"
|
|
2748
|
-
},
|
|
2749
|
-
meta: {
|
|
2750
|
-
version: "v{{version}}",
|
|
2751
|
-
authorPrefix: "от"
|
|
2752
|
-
},
|
|
2753
|
-
labels: {
|
|
2754
|
-
category: "Категория"
|
|
2755
|
-
},
|
|
2756
|
-
categories: {
|
|
2757
|
-
payment: "Платежи",
|
|
2758
|
-
notification: "Уведомления",
|
|
2759
|
-
fulfillment: "Доставка",
|
|
2760
|
-
search: "Поиск",
|
|
2761
|
-
content: "Контент",
|
|
2762
|
-
analytics: "Аналитика",
|
|
2763
|
-
authentication: "Аутентификация",
|
|
2764
|
-
erp: "ERP",
|
|
2765
|
-
crm: "CRM",
|
|
2766
|
-
pim: "PIM",
|
|
2767
|
-
marketplace: "Маркетплейс",
|
|
2768
|
-
feed: "Фиды",
|
|
2769
|
-
file_providers: "Файловые провайдеры",
|
|
2770
|
-
other: "Прочее"
|
|
2771
|
-
},
|
|
2772
|
-
actions: {
|
|
2773
|
-
test: "Проверить соединение",
|
|
2774
|
-
enable: "Включить",
|
|
2775
|
-
disable: "Выключить",
|
|
2776
|
-
"delete": "Удалить",
|
|
2777
|
-
edit: "Редактировать",
|
|
2778
|
-
save: "Сохранить",
|
|
2779
|
-
cancel: "Отмена"
|
|
2780
|
-
},
|
|
2781
|
-
"delete": {
|
|
2782
|
-
title: "Удалить конфигурацию",
|
|
2783
|
-
description: "Удалить сохранённую конфигурацию «{{name}}»? Это действие необратимо."
|
|
2784
|
-
},
|
|
2785
|
-
form: {
|
|
2786
|
-
required: "Поле «{{field}}» обязательно",
|
|
2787
|
-
invalidJson: "Некорректный JSON",
|
|
2788
|
-
keepSecret: "•••••• – оставьте пустым, чтобы не менять",
|
|
2789
|
-
items: "{{count}} шт."
|
|
2790
|
-
},
|
|
2791
|
-
toast: {
|
|
2792
|
-
saved: "Сохранено",
|
|
2793
|
-
saveFailed: "Не удалось сохранить",
|
|
2794
|
-
connectionOk: "Соединение установлено",
|
|
2795
|
-
testFailed: "Проверка не удалась",
|
|
2796
|
-
enabled: "Включено",
|
|
2797
|
-
disabled: "Выключено",
|
|
2798
|
-
deleted: "Конфигурация удалена",
|
|
2799
|
-
deleteFailed: "Не удалось удалить",
|
|
2800
|
-
updateFailed: "Не удалось обновить"
|
|
2801
|
-
},
|
|
2802
|
-
unknown: "Неизвестная интеграция «{{id}}».",
|
|
2803
|
-
back: "К интеграциям"
|
|
3318
|
+
const integration$g = { "list": { "title": "インテグレーション", "subtitle": "インテグレーションの設定を管理します", "browseIntegrations": "インテグレーションを探す", "learnMore": "インテグレーションの作り方を学ぶ", "searchPlaceholder": "インテグレーションを検索", "empty": "登録されているインテグレーションはありません。medusa-config のインテグレーションプラグインの options.providers にプロバイダーを宣言してください。", "emptyFiltered": "フィルターに一致するインテグレーションはありません。", "tested": "テスト済み", "testFailed": "テスト失敗", "tabs": { "all": "すべて" } }, "browse": { "title": "カタログ", "subtitle": "利用可能なインテグレーションを探す", "publish": "インテグレーションを追加", "learnMore": "独自のインテグレーションを作成して公開する方法を学ぶ", "searchPlaceholder": "インテグレーションを検索", "by": "{{author}} 作", "installed": "インストール済み", "notInstalled": "未インストール", "add": "追加", "settings": "設定", "install_docs": "ドキュメントを読む", "install_empty": "このインテグレーションのセットアップ手順はまだ利用できません。", "install_truncated": "この手順はここに表示するには長すぎます — ドキュメントを開いてください。" }, "columns": { "integration": "インテグレーション", "description": "説明", "category": "カテゴリー", "status": "ステータス" }, "status": { "notConfigured": "未設定", "incomplete": "未完了", "enabled": "有効", "disabled": "無効", "configured": "設定済み", "connected": "接続済み", "connectionFailed": "接続に失敗しました" }, "meta": { "version": "v{{version}}", "authorPrefix": "作成者" }, "labels": { "category": "カテゴリー" }, "categories": { "payment": "決済", "notification": "通知", "fulfillment": "フルフィルメント", "search": "検索", "content": "コンテンツ", "analytics": "分析", "authentication": "認証", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "マーケットプレイス", "feed": "フィード", "file_providers": "ファイルプロバイダー", "other": "その他" }, "actions": { "test": "接続テスト", "enable": "有効化", "disable": "無効化", "delete": "削除", "edit": "編集", "save": "保存", "cancel": "キャンセル" }, "delete": { "title": "設定を削除", "description": "{{name}} の保存済み設定を削除しますか?この操作は元に戻せません。" }, "form": { "required": "{{field}} は必須です", "invalidJson": "無効な JSON", "keepSecret": "•••••• – 変更しない場合は空欄のまま", "items": "{{count}} 件" }, "toast": { "saved": "保存しました", "saveFailed": "保存に失敗しました", "connectionOk": "接続に成功しました", "testFailed": "テストに失敗しました", "enabled": "有効にしました", "disabled": "無効にしました", "deleted": "設定を削除しました", "deleteFailed": "削除に失敗しました", "updateFailed": "更新に失敗しました" }, "unknown": "不明なインテグレーション「{{id}}」。", "back": "インテグレーションに戻る" };
|
|
3319
|
+
const ja = {
|
|
3320
|
+
integration: integration$g
|
|
2804
3321
|
};
|
|
3322
|
+
const integration$f = { "list": { "title": "통합", "subtitle": "통합 설정 관리", "browseIntegrations": "통합 둘러보기", "learnMore": "통합을 만드는 방법 알아보기", "searchPlaceholder": "통합 검색", "empty": "등록된 통합이 없습니다. medusa-config의 통합 플러그인 options.providers에 제공자를 선언하세요.", "emptyFiltered": "필터와 일치하는 통합이 없습니다.", "tested": "테스트됨", "testFailed": "테스트 실패", "tabs": { "all": "전체" } }, "browse": { "title": "카탈로그", "subtitle": "사용 가능한 통합 찾기", "publish": "통합 추가", "learnMore": "자신만의 통합을 만들고 게시하는 방법 알아보기", "searchPlaceholder": "통합 검색", "by": "{{author}} 제작", "installed": "설치됨", "notInstalled": "설치되지 않음", "add": "추가", "settings": "설정", "install_docs": "문서 읽기", "install_empty": "이 통합에 대한 설정 안내는 아직 제공되지 않습니다.", "install_truncated": "안내가 너무 길어 여기에 표시할 수 없습니다 — 문서를 열어 보세요." }, "columns": { "integration": "통합", "description": "설명", "category": "카테고리", "status": "상태" }, "status": { "notConfigured": "구성되지 않음", "incomplete": "미완료", "enabled": "활성화됨", "disabled": "비활성화됨", "configured": "구성됨", "connected": "연결됨", "connectionFailed": "연결 실패" }, "meta": { "version": "v{{version}}", "authorPrefix": "제작" }, "labels": { "category": "카테고리" }, "categories": { "payment": "결제", "notification": "알림", "fulfillment": "이행", "search": "검색", "content": "콘텐츠", "analytics": "분석", "authentication": "인증", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "마켓플레이스", "feed": "피드", "file_providers": "파일 제공자", "other": "기타" }, "actions": { "test": "연결 테스트", "enable": "활성화", "disable": "비활성화", "delete": "삭제", "edit": "편집", "save": "저장", "cancel": "취소" }, "delete": { "title": "구성 삭제", "description": "{{name}}의 저장된 구성을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다." }, "form": { "required": "{{field}}은(는) 필수입니다", "invalidJson": "잘못된 JSON", "keepSecret": "•••••• – 유지하려면 비워 두세요", "items": "{{count}}개 항목" }, "toast": { "saved": "저장됨", "saveFailed": "저장 실패", "connectionOk": "연결 성공", "testFailed": "테스트 실패", "enabled": "활성화됨", "disabled": "비활성화됨", "deleted": "구성이 삭제됨", "deleteFailed": "삭제 실패", "updateFailed": "업데이트 실패" }, "unknown": '알 수 없는 통합 "{{id}}".', "back": "통합으로 돌아가기" };
|
|
3323
|
+
const ko = {
|
|
3324
|
+
integration: integration$f
|
|
3325
|
+
};
|
|
3326
|
+
const integration$e = { "list": { "title": "Integracijos", "subtitle": "Integracijų nustatymų valdymas", "browseIntegrations": "Naršyti integracijas", "learnMore": "Sužinokite, kaip kurti integracijas", "searchPlaceholder": "Ieškoti integracijų", "empty": "Nėra registruotų integracijų. Nurodykite teikėjus integracijų papildinio options.providers medusa-config faile.", "emptyFiltered": "Nė viena integracija neatitinka jūsų filtrų.", "tested": "patikrinta", "testFailed": "patikra nepavyko", "tabs": { "all": "Visos" } }, "browse": { "title": "Katalogas", "subtitle": "Raskite prieinamas integracijas", "publish": "Pridėti integraciją", "learnMore": "Sužinokite, kaip sukurti ir paskelbti savo integraciją", "searchPlaceholder": "Ieškoti integracijų", "by": "sukūrė {{author}}", "installed": "Įdiegta", "notInstalled": "Neįdiegta", "add": "Pridėti", "settings": "Nustatymai", "install_docs": "Skaityti dokumentaciją", "install_empty": "Šios integracijos sąrankos instrukcijos dar nepasiekiamos.", "install_truncated": "Šios instrukcijos per ilgos, kad būtų rodomos čia — atverkite dokumentaciją." }, "columns": { "integration": "Integracija", "description": "Aprašymas", "category": "Kategorija", "status": "Būsena" }, "status": { "notConfigured": "Nesukonfigūruota", "incomplete": "Nebaigta", "enabled": "Įjungta", "disabled": "Išjungta", "configured": "Sukonfigūruota", "connected": "Prijungta", "connectionFailed": "Nepavyko prisijungti" }, "meta": { "version": "v{{version}}", "authorPrefix": "sukūrė" }, "labels": { "category": "Kategorija" }, "categories": { "payment": "Mokėjimai", "notification": "Pranešimai", "fulfillment": "Vykdymas", "search": "Paieška", "content": "Turinys", "analytics": "Analitika", "authentication": "Autentifikavimas", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Prekyvietė", "feed": "Srautai", "file_providers": "Failų teikėjai", "other": "Kita" }, "actions": { "test": "Tikrinti ryšį", "enable": "Įjungti", "disable": "Išjungti", "delete": "Ištrinti", "edit": "Keisti", "save": "Išsaugoti", "cancel": "Atšaukti" }, "delete": { "title": "Ištrinti konfigūraciją", "description": "Pašalinti išsaugotą {{name}} konfigūraciją? Šis veiksmas neatstatomas." }, "form": { "required": "{{field}} yra privalomas", "invalidJson": "Netinkamas JSON", "keepSecret": "•••••• – palikite tuščią, kad išliktų", "items": "{{count}} elementai" }, "toast": { "saved": "Išsaugota", "saveFailed": "Nepavyko išsaugoti", "connectionOk": "Ryšys sėkmingas", "testFailed": "Patikra nepavyko", "enabled": "Įjungta", "disabled": "Išjungta", "deleted": "Konfigūracija ištrinta", "deleteFailed": "Nepavyko ištrinti", "updateFailed": "Nepavyko atnaujinti" }, "unknown": "Nežinoma integracija „{{id}}“.", "back": "Atgal į integracijas" };
|
|
3327
|
+
const lt = {
|
|
3328
|
+
integration: integration$e
|
|
3329
|
+
};
|
|
3330
|
+
const integration$d = { "list": { "title": "Интеграции", "subtitle": "Управување со поставките на интеграциите", "browseIntegrations": "Прегледај интеграции", "learnMore": "Научете како да создавате интеграции", "searchPlaceholder": "Пребарај интеграции", "empty": "Нема регистрирани интеграции. Декларирајте даватели во options.providers на приклучокот за интеграции во medusa-config.", "emptyFiltered": "Нема интеграции што одговараат на вашите филтри.", "tested": "тестирано", "testFailed": "тестот не успеа", "tabs": { "all": "Сите" } }, "browse": { "title": "Каталог", "subtitle": "Најдете достапни интеграции", "publish": "Додај интеграција", "learnMore": "Научете како да создадете и објавите сопствена интеграција", "searchPlaceholder": "Пребарај интеграции", "by": "од {{author}}", "installed": "Инсталирано", "notInstalled": "Не е инсталирано", "add": "Додади", "settings": "Поставки", "install_docs": "Прочитај ја документацијата", "install_empty": "Упатствата за поставување на оваа интеграција сè уште не се достапни.", "install_truncated": "Овие упатства се предолги за да се прикажат овде — отворете ја документацијата." }, "columns": { "integration": "Интеграција", "description": "Опис", "category": "Категорија", "status": "Статус" }, "status": { "notConfigured": "Не е конфигурирано", "incomplete": "Незавршено", "enabled": "Овозможено", "disabled": "Оневозможено", "configured": "Конфигурирано", "connected": "Поврзано", "connectionFailed": "Поврзувањето не успеа" }, "meta": { "version": "v{{version}}", "authorPrefix": "од" }, "labels": { "category": "Категорија" }, "categories": { "payment": "Плаќања", "notification": "Известувања", "fulfillment": "Исполнување", "search": "Пребарување", "content": "Содржина", "analytics": "Аналитика", "authentication": "Автентикација", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Пазар", "feed": "Фидови", "file_providers": "Даватели на датотеки", "other": "Друго" }, "actions": { "test": "Тестирај врска", "enable": "Овозможи", "disable": "Оневозможи", "delete": "Избриши", "edit": "Уреди", "save": "Зачувај", "cancel": "Откажи" }, "delete": { "title": "Бришење на конфигурацијата", "description": "Да се отстрани зачуваната конфигурација за {{name}}? Ова дејство не може да се врати." }, "form": { "required": "{{field}} е задолжително", "invalidJson": "Неважечки JSON", "keepSecret": "•••••• – оставете празно за да го задржите", "items": "{{count}} ставки" }, "toast": { "saved": "Зачувано", "saveFailed": "Зачувувањето не успеа", "connectionOk": "Врската е успешна", "testFailed": "Тестот не успеа", "enabled": "Овозможено", "disabled": "Оневозможено", "deleted": "Конфигурацијата е избришана", "deleteFailed": "Бришењето не успеа", "updateFailed": "Ажурирањето не успеа" }, "unknown": "Непозната интеграција „{{id}}“.", "back": "Назад кон интеграциите" };
|
|
3331
|
+
const mk = {
|
|
3332
|
+
integration: integration$d
|
|
3333
|
+
};
|
|
3334
|
+
const integration$c = { "list": { "title": "Интеграциуд", "subtitle": "Интеграцийн тохиргоог удирдах", "browseIntegrations": "Интеграциудыг үзэх", "learnMore": "Интеграци хэрхэн бүтээхийг сурах", "searchPlaceholder": "Интеграци хайх", "empty": "Бүртгэгдсэн интеграци алга. medusa-config дахь интеграци залгаасын options.providers-д үйлчилгээ үзүүлэгчдийг зарлана уу.", "emptyFiltered": "Таны шүүлтүүрт тохирох интеграци алга.", "tested": "шалгасан", "testFailed": "шалгалт амжилтгүй", "tabs": { "all": "Бүгд" } }, "browse": { "title": "Каталог", "subtitle": "Боломжтой интеграциудыг олох", "publish": "Интеграци нэмэх", "learnMore": "Өөрийн интеграцийг хэрхэн бүтээж нийтлэхийг сурах", "searchPlaceholder": "Интеграци хайх", "by": "{{author}}-ээс", "installed": "Суулгасан", "notInstalled": "Суулгаагүй", "add": "Нэмэх", "settings": "Тохиргоо", "install_docs": "Баримтжуулалтыг унших", "install_empty": "Энэ интеграцийн тохируулгын заавар хараахан бэлэн болоогүй байна.", "install_truncated": "Энэ заавар энд харуулахад хэт урт байна — баримтжуулалтыг нээнэ үү." }, "columns": { "integration": "Интеграци", "description": "Тайлбар", "category": "Ангилал", "status": "Төлөв" }, "status": { "notConfigured": "Тохируулаагүй", "incomplete": "Дуусаагүй", "enabled": "Идэвхтэй", "disabled": "Идэвхгүй", "configured": "Тохируулсан", "connected": "Холбогдсон", "connectionFailed": "Холболт амжилтгүй" }, "meta": { "version": "v{{version}}", "authorPrefix": "зохиогч" }, "labels": { "category": "Ангилал" }, "categories": { "payment": "Төлбөр", "notification": "Мэдэгдэл", "fulfillment": "Биелэлт", "search": "Хайлт", "content": "Контент", "analytics": "Аналитик", "authentication": "Баталгаажуулалт", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Маркетплейс", "feed": "Фийд", "file_providers": "Файлын үйлчилгээ үзүүлэгчид", "other": "Бусад" }, "actions": { "test": "Холболтыг шалгах", "enable": "Идэвхжүүлэх", "disable": "Идэвхгүй болгох", "delete": "Устгах", "edit": "Засварлах", "save": "Хадгалах", "cancel": "Цуцлах" }, "delete": { "title": "Тохиргоог устгах", "description": "{{name}}-ийн хадгалагдсан тохиргоог устгах уу? Энэ үйлдлийг буцаах боломжгүй." }, "form": { "required": "{{field}} шаардлагатай", "invalidJson": "Буруу JSON", "keepSecret": "•••••• – хэвээр үлдээхийн тулд хоосон орхино уу", "items": "{{count}} зүйл" }, "toast": { "saved": "Хадгалагдлаа", "saveFailed": "Хадгалахад алдаа гарлаа", "connectionOk": "Холболт амжилттай", "testFailed": "Шалгалт амжилтгүй боллоо", "enabled": "Идэвхжлээ", "disabled": "Идэвхгүй боллоо", "deleted": "Тохиргоог устгалаа", "deleteFailed": "Устгахад алдаа гарлаа", "updateFailed": "Шинэчлэхэд алдаа гарлаа" }, "unknown": "Тодорхойгүй интеграци «{{id}}».", "back": "Интеграциуд руу буцах" };
|
|
3335
|
+
const mn = {
|
|
3336
|
+
integration: integration$c
|
|
3337
|
+
};
|
|
3338
|
+
const integration$b = { "list": { "title": "Integraties", "subtitle": "Beheer de instellingen van integraties", "browseIntegrations": "Integraties bekijken", "learnMore": "Leer hoe je integraties bouwt", "searchPlaceholder": "Integraties zoeken", "empty": "Geen integraties geregistreerd. Declareer providers in options.providers van de integratieplug-in in medusa-config.", "emptyFiltered": "Geen integraties komen overeen met je filters.", "tested": "getest", "testFailed": "test mislukt", "tabs": { "all": "Alle" } }, "browse": { "title": "Catalogus", "subtitle": "Vind beschikbare integraties", "publish": "Integratie toevoegen", "learnMore": "Leer hoe je je eigen integratie bouwt en publiceert", "searchPlaceholder": "Integraties zoeken", "by": "door {{author}}", "installed": "Geïnstalleerd", "notInstalled": "Niet geïnstalleerd", "add": "Toevoegen", "settings": "Instellingen", "install_docs": "Documentatie lezen", "install_empty": "Installatie-instructies voor deze integratie zijn nog niet beschikbaar.", "install_truncated": "Deze instructies zijn te lang om hier te tonen — open de documentatie." }, "columns": { "integration": "Integratie", "description": "Beschrijving", "category": "Categorie", "status": "Status" }, "status": { "notConfigured": "Niet geconfigureerd", "incomplete": "Onvolledig", "enabled": "Ingeschakeld", "disabled": "Uitgeschakeld", "configured": "Geconfigureerd", "connected": "Verbonden", "connectionFailed": "Verbinding mislukt" }, "meta": { "version": "v{{version}}", "authorPrefix": "door" }, "labels": { "category": "Categorie" }, "categories": { "payment": "Betalingen", "notification": "Notificaties", "fulfillment": "Verzending", "search": "Zoeken", "content": "Content", "analytics": "Analytics", "authentication": "Authenticatie", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marktplaats", "feed": "Feeds", "file_providers": "Bestandsproviders", "other": "Overig" }, "actions": { "test": "Verbinding testen", "enable": "Inschakelen", "disable": "Uitschakelen", "delete": "Verwijderen", "edit": "Bewerken", "save": "Opslaan", "cancel": "Annuleren" }, "delete": { "title": "Configuratie verwijderen", "description": "De opgeslagen configuratie voor {{name}} verwijderen? Deze actie kan niet ongedaan worden gemaakt." }, "form": { "required": "{{field}} is verplicht", "invalidJson": "Ongeldige JSON", "keepSecret": "•••••• – laat leeg om te behouden", "items": "{{count}} items" }, "toast": { "saved": "Opgeslagen", "saveFailed": "Opslaan mislukt", "connectionOk": "Verbinding OK", "testFailed": "Test mislukt", "enabled": "Ingeschakeld", "disabled": "Uitgeschakeld", "deleted": "Configuratie verwijderd", "deleteFailed": "Verwijderen mislukt", "updateFailed": "Bijwerken mislukt" }, "unknown": 'Onbekende integratie "{{id}}".', "back": "Terug naar integraties" };
|
|
3339
|
+
const nl = {
|
|
3340
|
+
integration: integration$b
|
|
3341
|
+
};
|
|
3342
|
+
const integration$a = { "list": { "title": "Integracje", "subtitle": "Zarządzaj ustawieniami integracji", "browseIntegrations": "Przeglądaj integracje", "learnMore": "Dowiedz się, jak tworzyć integracje", "searchPlaceholder": "Szukaj integracji", "empty": "Brak zarejestrowanych integracji. Zadeklaruj dostawców w options.providers wtyczki integracji w medusa-config.", "emptyFiltered": "Żadna integracja nie pasuje do filtrów.", "tested": "przetestowano", "testFailed": "test nieudany", "tabs": { "all": "Wszystkie" } }, "browse": { "title": "Katalog", "subtitle": "Znajdź dostępne integracje", "publish": "Dodaj integrację", "learnMore": "Dowiedz się, jak stworzyć i opublikować własną integrację", "searchPlaceholder": "Szukaj integracji", "by": "od {{author}}", "installed": "Zainstalowano", "notInstalled": "Niezainstalowano", "add": "Dodaj", "settings": "Ustawienia", "install_docs": "Przeczytaj dokumentację", "install_empty": "Instrukcja konfiguracji tej integracji nie jest jeszcze dostępna.", "install_truncated": "Ta instrukcja jest zbyt długa, aby wyświetlić ją tutaj — otwórz dokumentację." }, "columns": { "integration": "Integracja", "description": "Opis", "category": "Kategoria", "status": "Status" }, "status": { "notConfigured": "Nieskonfigurowane", "incomplete": "Niekompletne", "enabled": "Włączone", "disabled": "Wyłączone", "configured": "Skonfigurowane", "connected": "Połączono", "connectionFailed": "Połączenie nieudane" }, "meta": { "version": "v{{version}}", "authorPrefix": "od" }, "labels": { "category": "Kategoria" }, "categories": { "payment": "Płatności", "notification": "Powiadomienia", "fulfillment": "Realizacja", "search": "Wyszukiwanie", "content": "Treść", "analytics": "Analityka", "authentication": "Uwierzytelnianie", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Kanały", "file_providers": "Dostawcy plików", "other": "Inne" }, "actions": { "test": "Testuj połączenie", "enable": "Włącz", "disable": "Wyłącz", "delete": "Usuń", "edit": "Edytuj", "save": "Zapisz", "cancel": "Anuluj" }, "delete": { "title": "Usuń konfigurację", "description": "Usunąć zapisaną konfigurację dla {{name}}? Tej akcji nie można cofnąć." }, "form": { "required": "{{field}} jest wymagane", "invalidJson": "Nieprawidłowy JSON", "keepSecret": "•••••• – pozostaw puste, aby zachować", "items": "{{count}} elementów" }, "toast": { "saved": "Zapisano", "saveFailed": "Nie udało się zapisać", "connectionOk": "Połączenie OK", "testFailed": "Test nieudany", "enabled": "Włączono", "disabled": "Wyłączono", "deleted": "Konfiguracja usunięta", "deleteFailed": "Nie udało się usunąć", "updateFailed": "Nie udało się zaktualizować" }, "unknown": "Nieznana integracja „{{id}}”.", "back": "Powrót do integracji" };
|
|
3343
|
+
const pl = {
|
|
3344
|
+
integration: integration$a
|
|
3345
|
+
};
|
|
3346
|
+
const integration$9 = { "list": { "title": "Integrações", "subtitle": "Gerencie as configurações das integrações", "browseIntegrations": "Explorar integrações", "learnMore": "Aprenda a criar integrações", "searchPlaceholder": "Buscar integrações", "empty": "Nenhuma integração registrada. Declare os provedores em options.providers do plugin de integrações no medusa-config.", "emptyFiltered": "Nenhuma integração corresponde aos seus filtros.", "tested": "testado", "testFailed": "falha no teste", "tabs": { "all": "Todas" } }, "browse": { "title": "Catálogo", "subtitle": "Encontre integrações disponíveis", "publish": "Adicionar integração", "learnMore": "Aprenda a criar e publicar sua própria integração", "searchPlaceholder": "Buscar integrações", "by": "por {{author}}", "installed": "Instalado", "notInstalled": "Não instalado", "add": "Adicionar", "settings": "Configurações", "install_docs": "Ler documentação", "install_empty": "As instruções de configuração desta integração ainda não estão disponíveis.", "install_truncated": "Estas instruções são longas demais para exibir aqui — abra a documentação." }, "columns": { "integration": "Integração", "description": "Descrição", "category": "Categoria", "status": "Status" }, "status": { "notConfigured": "Não configurado", "incomplete": "Incompleto", "enabled": "Habilitado", "disabled": "Desabilitado", "configured": "Configurado", "connected": "Conectado", "connectionFailed": "Falha na conexão" }, "meta": { "version": "v{{version}}", "authorPrefix": "por" }, "labels": { "category": "Categoria" }, "categories": { "payment": "Pagamentos", "notification": "Notificações", "fulfillment": "Atendimento", "search": "Busca", "content": "Conteúdo", "analytics": "Análises", "authentication": "Autenticação", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feeds", "file_providers": "Provedores de arquivos", "other": "Outros" }, "actions": { "test": "Testar conexão", "enable": "Habilitar", "disable": "Desabilitar", "delete": "Excluir", "edit": "Editar", "save": "Salvar", "cancel": "Cancelar" }, "delete": { "title": "Excluir configuração", "description": "Remover a configuração salva de {{name}}? Esta ação não pode ser desfeita." }, "form": { "required": "{{field}} é obrigatório", "invalidJson": "JSON inválido", "keepSecret": "•••••• – deixe em branco para manter", "items": "{{count}} itens" }, "toast": { "saved": "Salvo", "saveFailed": "Falha ao salvar", "connectionOk": "Conexão OK", "testFailed": "Falha no teste", "enabled": "Habilitado", "disabled": "Desabilitado", "deleted": "Configuração excluída", "deleteFailed": "Falha ao excluir", "updateFailed": "Falha ao atualizar" }, "unknown": 'Integração desconhecida "{{id}}".', "back": "Voltar para integrações" };
|
|
3347
|
+
const ptBR = {
|
|
3348
|
+
integration: integration$9
|
|
3349
|
+
};
|
|
3350
|
+
const integration$8 = { "list": { "title": "Integrações", "subtitle": "Gere as definições das integrações", "browseIntegrations": "Explorar integrações", "learnMore": "Aprende a criar integrações", "searchPlaceholder": "Pesquisar integrações", "empty": "Nenhuma integração registada. Declara os fornecedores em options.providers do plugin de integrações no medusa-config.", "emptyFiltered": "Nenhuma integração corresponde aos teus filtros.", "tested": "testado", "testFailed": "falha no teste", "tabs": { "all": "Todas" } }, "browse": { "title": "Catálogo", "subtitle": "Encontra integrações disponíveis", "publish": "Adicionar integração", "learnMore": "Aprende a criar e publicar a tua própria integração", "searchPlaceholder": "Pesquisar integrações", "by": "por {{author}}", "installed": "Instalado", "notInstalled": "Não instalado", "add": "Adicionar", "settings": "Definições", "install_docs": "Ler documentação", "install_empty": "As instruções de configuração desta integração ainda não estão disponíveis.", "install_truncated": "Estas instruções são demasiado longas para mostrar aqui — abre a documentação." }, "columns": { "integration": "Integração", "description": "Descrição", "category": "Categoria", "status": "Estado" }, "status": { "notConfigured": "Não configurado", "incomplete": "Incompleto", "enabled": "Ativado", "disabled": "Desativado", "configured": "Configurado", "connected": "Ligado", "connectionFailed": "Falha na ligação" }, "meta": { "version": "v{{version}}", "authorPrefix": "por" }, "labels": { "category": "Categoria" }, "categories": { "payment": "Pagamentos", "notification": "Notificações", "fulfillment": "Cumprimento", "search": "Pesquisa", "content": "Conteúdo", "analytics": "Análises", "authentication": "Autenticação", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Feeds", "file_providers": "Fornecedores de ficheiros", "other": "Outros" }, "actions": { "test": "Testar ligação", "enable": "Ativar", "disable": "Desativar", "delete": "Eliminar", "edit": "Editar", "save": "Guardar", "cancel": "Cancelar" }, "delete": { "title": "Eliminar configuração", "description": "Remover a configuração guardada de {{name}}? Esta ação não pode ser anulada." }, "form": { "required": "{{field}} é obrigatório", "invalidJson": "JSON inválido", "keepSecret": "•••••• – deixa em branco para manter", "items": "{{count}} itens" }, "toast": { "saved": "Guardado", "saveFailed": "Falha ao guardar", "connectionOk": "Ligação OK", "testFailed": "Falha no teste", "enabled": "Ativado", "disabled": "Desativado", "deleted": "Configuração eliminada", "deleteFailed": "Falha ao eliminar", "updateFailed": "Falha ao atualizar" }, "unknown": "Integração desconhecida «{{id}}».", "back": "Voltar às integrações" };
|
|
3351
|
+
const ptPT = {
|
|
3352
|
+
integration: integration$8
|
|
3353
|
+
};
|
|
3354
|
+
const integration$7 = { "list": { "title": "Integrări", "subtitle": "Gestionează setările integrărilor", "browseIntegrations": "Răsfoiește integrările", "learnMore": "Află cum să creezi integrări", "searchPlaceholder": "Caută integrări", "empty": "Nicio integrare înregistrată. Declară furnizorii în options.providers al pluginului de integrări din medusa-config.", "emptyFiltered": "Nicio integrare nu corespunde filtrelor.", "tested": "testat", "testFailed": "testul a eșuat", "tabs": { "all": "Toate" } }, "browse": { "title": "Catalog", "subtitle": "Găsește integrările disponibile", "publish": "Adaugă integrare", "learnMore": "Află cum să creezi și să publici propria integrare", "searchPlaceholder": "Caută integrări", "by": "de {{author}}", "installed": "Instalat", "notInstalled": "Neinstalat", "add": "Adaugă", "settings": "Setări", "install_docs": "Citește documentația", "install_empty": "Instrucțiunile de configurare pentru această integrare nu sunt încă disponibile.", "install_truncated": "Aceste instrucțiuni sunt prea lungi pentru a fi afișate aici — deschide documentația." }, "columns": { "integration": "Integrare", "description": "Descriere", "category": "Categorie", "status": "Stare" }, "status": { "notConfigured": "Neconfigurat", "incomplete": "Incomplet", "enabled": "Activat", "disabled": "Dezactivat", "configured": "Configurat", "connected": "Conectat", "connectionFailed": "Conectarea a eșuat" }, "meta": { "version": "v{{version}}", "authorPrefix": "de" }, "labels": { "category": "Categorie" }, "categories": { "payment": "Plăți", "notification": "Notificări", "fulfillment": "Îndeplinire", "search": "Căutare", "content": "Conținut", "analytics": "Analize", "authentication": "Autentificare", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Marketplace", "feed": "Fluxuri", "file_providers": "Furnizori de fișiere", "other": "Altele" }, "actions": { "test": "Testează conexiunea", "enable": "Activează", "disable": "Dezactivează", "delete": "Șterge", "edit": "Editează", "save": "Salvează", "cancel": "Anulează" }, "delete": { "title": "Șterge configurația", "description": "Elimini configurația salvată pentru {{name}}? Această acțiune nu poate fi anulată." }, "form": { "required": "{{field}} este obligatoriu", "invalidJson": "JSON invalid", "keepSecret": "•••••• – lasă gol pentru a păstra", "items": "{{count}} elemente" }, "toast": { "saved": "Salvat", "saveFailed": "Salvarea a eșuat", "connectionOk": "Conexiune reușită", "testFailed": "Testul a eșuat", "enabled": "Activat", "disabled": "Dezactivat", "deleted": "Configurație ștearsă", "deleteFailed": "Ștergerea a eșuat", "updateFailed": "Actualizarea a eșuat" }, "unknown": "Integrare necunoscută „{{id}}”.", "back": "Înapoi la integrări" };
|
|
3355
|
+
const ro = {
|
|
3356
|
+
integration: integration$7
|
|
3357
|
+
};
|
|
3358
|
+
const integration$6 = { "list": { "title": "Интеграции", "subtitle": "Управление настройками интеграций", "browseIntegrations": "Найти интеграции", "learnMore": "Как создавать интеграции", "searchPlaceholder": "Поиск интеграций", "empty": "Нет зарегистрированных интеграций. Объявите провайдеров в options.providers плагина интеграций в medusa-config.", "emptyFiltered": "Нет интеграций по заданным фильтрам", "tested": "проверено", "testFailed": "ошибка проверки", "tabs": { "all": "Все" } }, "browse": { "title": "Каталог", "subtitle": "Поиск доступных интеграций", "publish": "Добавить интеграцию", "learnMore": "Как создать и опубликовать свою интеграцию", "searchPlaceholder": "Поиск интеграций", "by": "от {{author}}", "installed": "Установлено", "notInstalled": "Не установлено", "add": "Добавить", "settings": "Настройки", "install_docs": "Читать документацию", "install_empty": "Инструкция по настройке для этой интеграции пока недоступна.", "install_truncated": "Инструкция слишком длинная для показа здесь — откройте документацию." }, "columns": { "integration": "Интеграция", "description": "Описание", "category": "Категория", "status": "Статус" }, "status": { "notConfigured": "Не настроено", "incomplete": "Не завершено", "enabled": "Включено", "disabled": "Выключено", "configured": "Настроено", "connected": "Подключено", "connectionFailed": "Ошибка подключения" }, "meta": { "version": "v{{version}}", "authorPrefix": "от" }, "labels": { "category": "Категория" }, "categories": { "payment": "Платежи", "notification": "Уведомления", "fulfillment": "Доставка", "search": "Поиск", "content": "Контент", "analytics": "Аналитика", "authentication": "Аутентификация", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Маркетплейс", "feed": "Фиды", "file_providers": "Файловые провайдеры", "other": "Прочее" }, "actions": { "test": "Проверить соединение", "enable": "Включить", "disable": "Выключить", "delete": "Удалить", "edit": "Редактировать", "save": "Сохранить", "cancel": "Отмена" }, "delete": { "title": "Удалить конфигурацию", "description": "Удалить сохранённую конфигурацию «{{name}}»? Это действие необратимо." }, "form": { "required": "Поле «{{field}}» обязательно", "invalidJson": "Некорректный JSON", "keepSecret": "•••••• – оставьте пустым, чтобы не менять", "items": "{{count}} шт." }, "toast": { "saved": "Сохранено", "saveFailed": "Не удалось сохранить", "connectionOk": "Соединение установлено", "testFailed": "Проверка не удалась", "enabled": "Включено", "disabled": "Выключено", "deleted": "Конфигурация удалена", "deleteFailed": "Не удалось удалить", "updateFailed": "Не удалось обновить" }, "unknown": "Неизвестная интеграция «{{id}}».", "back": "К интеграциям" };
|
|
2805
3359
|
const ru = {
|
|
3360
|
+
integration: integration$6
|
|
3361
|
+
};
|
|
3362
|
+
const integration$5 = { "list": { "title": "การเชื่อมต่อ", "subtitle": "จัดการการตั้งค่าการเชื่อมต่อ", "browseIntegrations": "เรียกดูการเชื่อมต่อ", "learnMore": "เรียนรู้วิธีสร้างการเชื่อมต่อ", "searchPlaceholder": "ค้นหาการเชื่อมต่อ", "empty": "ยังไม่มีการเชื่อมต่อที่ลงทะเบียน ประกาศผู้ให้บริการใน options.providers ของปลั๊กอินการเชื่อมต่อใน medusa-config", "emptyFiltered": "ไม่มีการเชื่อมต่อที่ตรงกับตัวกรองของคุณ", "tested": "ทดสอบแล้ว", "testFailed": "ทดสอบล้มเหลว", "tabs": { "all": "ทั้งหมด" } }, "browse": { "title": "แคตตาล็อก", "subtitle": "ค้นหาการเชื่อมต่อที่พร้อมใช้งาน", "publish": "เพิ่มการเชื่อมต่อ", "learnMore": "เรียนรู้วิธีสร้างและเผยแพร่การเชื่อมต่อของคุณเอง", "searchPlaceholder": "ค้นหาการเชื่อมต่อ", "by": "โดย {{author}}", "installed": "ติดตั้งแล้ว", "notInstalled": "ยังไม่ได้ติดตั้ง", "add": "เพิ่ม", "settings": "การตั้งค่า", "install_docs": "อ่านเอกสาร", "install_empty": "คำแนะนำการตั้งค่าสำหรับการเชื่อมต่อนี้ยังไม่พร้อมใช้งาน", "install_truncated": "คำแนะนำนี้ยาวเกินกว่าจะแสดงที่นี่ — เปิดเอกสารประกอบ" }, "columns": { "integration": "การเชื่อมต่อ", "description": "คำอธิบาย", "category": "หมวดหมู่", "status": "สถานะ" }, "status": { "notConfigured": "ยังไม่ได้ตั้งค่า", "incomplete": "ไม่สมบูรณ์", "enabled": "เปิดใช้งาน", "disabled": "ปิดใช้งาน", "configured": "ตั้งค่าแล้ว", "connected": "เชื่อมต่อแล้ว", "connectionFailed": "การเชื่อมต่อล้มเหลว" }, "meta": { "version": "v{{version}}", "authorPrefix": "โดย" }, "labels": { "category": "หมวดหมู่" }, "categories": { "payment": "การชำระเงิน", "notification": "การแจ้งเตือน", "fulfillment": "การจัดส่ง", "search": "ค้นหา", "content": "เนื้อหา", "analytics": "การวิเคราะห์", "authentication": "การยืนยันตัวตน", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "มาร์เก็ตเพลส", "feed": "ฟีด", "file_providers": "ผู้ให้บริการไฟล์", "other": "อื่นๆ" }, "actions": { "test": "ทดสอบการเชื่อมต่อ", "enable": "เปิดใช้งาน", "disable": "ปิดใช้งาน", "delete": "ลบ", "edit": "แก้ไข", "save": "บันทึก", "cancel": "ยกเลิก" }, "delete": { "title": "ลบการตั้งค่า", "description": "ลบการตั้งค่าที่บันทึกไว้สำหรับ {{name}} หรือไม่? การกระทำนี้ไม่สามารถย้อนกลับได้" }, "form": { "required": "ต้องระบุ {{field}}", "invalidJson": "JSON ไม่ถูกต้อง", "keepSecret": "•••••• – เว้นว่างไว้เพื่อคงค่าเดิม", "items": "{{count}} รายการ" }, "toast": { "saved": "บันทึกแล้ว", "saveFailed": "บันทึกไม่สำเร็จ", "connectionOk": "เชื่อมต่อสำเร็จ", "testFailed": "ทดสอบไม่สำเร็จ", "enabled": "เปิดใช้งานแล้ว", "disabled": "ปิดใช้งานแล้ว", "deleted": "ลบการตั้งค่าแล้ว", "deleteFailed": "ลบไม่สำเร็จ", "updateFailed": "อัปเดตไม่สำเร็จ" }, "unknown": 'ไม่รู้จักการเชื่อมต่อ "{{id}}"', "back": "กลับไปที่การเชื่อมต่อ" };
|
|
3363
|
+
const th = {
|
|
3364
|
+
integration: integration$5
|
|
3365
|
+
};
|
|
3366
|
+
const integration$4 = { "list": { "title": "Entegrasyonlar", "subtitle": "Entegrasyon ayarlarını yönetin", "browseIntegrations": "Entegrasyonlara göz atın", "learnMore": "Entegrasyonların nasıl oluşturulduğunu öğrenin", "searchPlaceholder": "Entegrasyon ara", "empty": "Kayıtlı entegrasyon yok. Sağlayıcıları medusa-config içindeki entegrasyon eklentisinin options.providers alanında tanımlayın.", "emptyFiltered": "Filtrelerinizle eşleşen entegrasyon yok.", "tested": "test edildi", "testFailed": "test başarısız", "tabs": { "all": "Tümü" } }, "browse": { "title": "Katalog", "subtitle": "Mevcut entegrasyonları bulun", "publish": "Entegrasyon ekle", "learnMore": "Kendi entegrasyonunuzu nasıl oluşturup yayımlayacağınızı öğrenin", "searchPlaceholder": "Entegrasyon ara", "by": "{{author}} tarafından", "installed": "Kurulu", "notInstalled": "Kurulu değil", "add": "Ekle", "settings": "Ayarlar", "install_docs": "Dokümantasyonu oku", "install_empty": "Bu entegrasyon için kurulum talimatları henüz mevcut değil.", "install_truncated": "Bu talimatlar burada gösterilemeyecek kadar uzun — dokümantasyonu açın." }, "columns": { "integration": "Entegrasyon", "description": "Açıklama", "category": "Kategori", "status": "Durum" }, "status": { "notConfigured": "Yapılandırılmadı", "incomplete": "Tamamlanmadı", "enabled": "Etkin", "disabled": "Devre dışı", "configured": "Yapılandırıldı", "connected": "Bağlandı", "connectionFailed": "Bağlantı başarısız" }, "meta": { "version": "v{{version}}", "authorPrefix": "geliştiren" }, "labels": { "category": "Kategori" }, "categories": { "payment": "Ödeme", "notification": "Bildirimler", "fulfillment": "Sipariş karşılama", "search": "Arama", "content": "İçerik", "analytics": "Analitik", "authentication": "Kimlik doğrulama", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Pazar yeri", "feed": "Beslemeler", "file_providers": "Dosya sağlayıcıları", "other": "Diğer" }, "actions": { "test": "Bağlantıyı test et", "enable": "Etkinleştir", "disable": "Devre dışı bırak", "delete": "Sil", "edit": "Düzenle", "save": "Kaydet", "cancel": "İptal" }, "delete": { "title": "Yapılandırmayı sil", "description": "{{name}} için kayıtlı yapılandırma kaldırılsın mı? Bu işlem geri alınamaz." }, "form": { "required": "{{field}} zorunludur", "invalidJson": "Geçersiz JSON", "keepSecret": "•••••• – korumak için boş bırakın", "items": "{{count}} öğe" }, "toast": { "saved": "Kaydedildi", "saveFailed": "Kaydetme başarısız", "connectionOk": "Bağlantı başarılı", "testFailed": "Test başarısız", "enabled": "Etkinleştirildi", "disabled": "Devre dışı bırakıldı", "deleted": "Yapılandırma silindi", "deleteFailed": "Silme başarısız", "updateFailed": "Güncelleme başarısız" }, "unknown": 'Bilinmeyen entegrasyon "{{id}}".', "back": "Entegrasyonlara dön" };
|
|
3367
|
+
const tr = {
|
|
3368
|
+
integration: integration$4
|
|
3369
|
+
};
|
|
3370
|
+
const integration$3 = { "list": { "title": "Інтеграції", "subtitle": "Керування налаштуваннями інтеграцій", "browseIntegrations": "Переглянути інтеграції", "learnMore": "Дізнайтеся, як створювати інтеграції", "searchPlaceholder": "Пошук інтеграцій", "empty": "Немає зареєстрованих інтеграцій. Оголосіть постачальників у options.providers плагіна інтеграцій у medusa-config.", "emptyFiltered": "Немає інтеграцій, що відповідають вашим фільтрам.", "tested": "перевірено", "testFailed": "помилка перевірки", "tabs": { "all": "Усі" } }, "browse": { "title": "Каталог", "subtitle": "Знайдіть доступні інтеграції", "publish": "Додати інтеграцію", "learnMore": "Дізнайтеся, як створити та опублікувати власну інтеграцію", "searchPlaceholder": "Пошук інтеграцій", "by": "від {{author}}", "installed": "Встановлено", "notInstalled": "Не встановлено", "add": "Додати", "settings": "Налаштування", "install_docs": "Читати документацію", "install_empty": "Інструкція з налаштування для цієї інтеграції поки недоступна.", "install_truncated": "Інструкція надто довга для показу тут — відкрийте документацію." }, "columns": { "integration": "Інтеграція", "description": "Опис", "category": "Категорія", "status": "Статус" }, "status": { "notConfigured": "Не налаштовано", "incomplete": "Не завершено", "enabled": "Увімкнено", "disabled": "Вимкнено", "configured": "Налаштовано", "connected": "Підключено", "connectionFailed": "Помилка підключення" }, "meta": { "version": "v{{version}}", "authorPrefix": "від" }, "labels": { "category": "Категорія" }, "categories": { "payment": "Платежі", "notification": "Сповіщення", "fulfillment": "Виконання", "search": "Пошук", "content": "Контент", "analytics": "Аналітика", "authentication": "Автентифікація", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Маркетплейс", "feed": "Фіди", "file_providers": "Файлові постачальники", "other": "Інше" }, "actions": { "test": "Перевірити з'єднання", "enable": "Увімкнути", "disable": "Вимкнути", "delete": "Видалити", "edit": "Редагувати", "save": "Зберегти", "cancel": "Скасувати" }, "delete": { "title": "Видалити конфігурацію", "description": "Видалити збережену конфігурацію для {{name}}? Цю дію неможливо скасувати." }, "form": { "required": "Поле «{{field}}» обов'язкове", "invalidJson": "Некоректний JSON", "keepSecret": "•••••• – залиште порожнім, щоб не змінювати", "items": "{{count}} шт." }, "toast": { "saved": "Збережено", "saveFailed": "Не вдалося зберегти", "connectionOk": "З'єднання встановлено", "testFailed": "Перевірка не вдалася", "enabled": "Увімкнено", "disabled": "Вимкнено", "deleted": "Конфігурацію видалено", "deleteFailed": "Не вдалося видалити", "updateFailed": "Не вдалося оновити" }, "unknown": "Невідома інтеграція «{{id}}».", "back": "До інтеграцій" };
|
|
3371
|
+
const uk = {
|
|
3372
|
+
integration: integration$3
|
|
3373
|
+
};
|
|
3374
|
+
const integration$2 = { "list": { "title": "Tích hợp", "subtitle": "Quản lý cài đặt tích hợp", "browseIntegrations": "Duyệt các tích hợp", "learnMore": "Tìm hiểu cách xây dựng tích hợp", "searchPlaceholder": "Tìm kiếm tích hợp", "empty": "Chưa có tích hợp nào được đăng ký. Khai báo nhà cung cấp trong options.providers của plugin tích hợp trong medusa-config.", "emptyFiltered": "Không có tích hợp nào khớp với bộ lọc của bạn.", "tested": "đã kiểm tra", "testFailed": "kiểm tra thất bại", "tabs": { "all": "Tất cả" } }, "browse": { "title": "Danh mục", "subtitle": "Tìm các tích hợp có sẵn", "publish": "Thêm tích hợp", "learnMore": "Tìm hiểu cách xây dựng và phát hành tích hợp của riêng bạn", "searchPlaceholder": "Tìm kiếm tích hợp", "by": "bởi {{author}}", "installed": "Đã cài đặt", "notInstalled": "Chưa cài đặt", "add": "Thêm", "settings": "Cài đặt", "install_docs": "Đọc tài liệu", "install_empty": "Hướng dẫn thiết lập cho tích hợp này chưa có sẵn.", "install_truncated": "Hướng dẫn này quá dài để hiển thị ở đây — hãy mở tài liệu." }, "columns": { "integration": "Tích hợp", "description": "Mô tả", "category": "Danh mục", "status": "Trạng thái" }, "status": { "notConfigured": "Chưa cấu hình", "incomplete": "Chưa hoàn tất", "enabled": "Đã bật", "disabled": "Đã tắt", "configured": "Đã cấu hình", "connected": "Đã kết nối", "connectionFailed": "Kết nối thất bại" }, "meta": { "version": "v{{version}}", "authorPrefix": "bởi" }, "labels": { "category": "Danh mục" }, "categories": { "payment": "Thanh toán", "notification": "Thông báo", "fulfillment": "Xử lý giao hàng", "search": "Tìm kiếm", "content": "Nội dung", "analytics": "Phân tích", "authentication": "Xác thực", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "Sàn thương mại", "feed": "Nguồn cấp", "file_providers": "Nhà cung cấp tệp", "other": "Khác" }, "actions": { "test": "Kiểm tra kết nối", "enable": "Bật", "disable": "Tắt", "delete": "Xóa", "edit": "Chỉnh sửa", "save": "Lưu", "cancel": "Hủy" }, "delete": { "title": "Xóa cấu hình", "description": "Xóa cấu hình đã lưu cho {{name}}? Hành động này không thể hoàn tác." }, "form": { "required": "{{field}} là bắt buộc", "invalidJson": "JSON không hợp lệ", "keepSecret": "•••••• – để trống để giữ nguyên", "items": "{{count}} mục" }, "toast": { "saved": "Đã lưu", "saveFailed": "Lưu thất bại", "connectionOk": "Kết nối thành công", "testFailed": "Kiểm tra thất bại", "enabled": "Đã bật", "disabled": "Đã tắt", "deleted": "Đã xóa cấu hình", "deleteFailed": "Xóa thất bại", "updateFailed": "Cập nhật thất bại" }, "unknown": 'Tích hợp không xác định "{{id}}".', "back": "Quay lại tích hợp" };
|
|
3375
|
+
const vi = {
|
|
3376
|
+
integration: integration$2
|
|
3377
|
+
};
|
|
3378
|
+
const integration$1 = { "list": { "title": "集成", "subtitle": "管理集成设置", "browseIntegrations": "浏览集成", "learnMore": "了解如何构建集成", "searchPlaceholder": "搜索集成", "empty": "尚未注册任何集成。请在 medusa-config 中集成插件的 options.providers 下声明供应商。", "emptyFiltered": "没有符合筛选条件的集成。", "tested": "已测试", "testFailed": "测试失败", "tabs": { "all": "全部" } }, "browse": { "title": "目录", "subtitle": "查找可用的集成", "publish": "添加集成", "learnMore": "了解如何构建并发布你自己的集成", "searchPlaceholder": "搜索集成", "by": "由 {{author}} 提供", "installed": "已安装", "notInstalled": "未安装", "add": "添加", "settings": "设置", "install_docs": "阅读文档", "install_empty": "该集成的设置说明尚不可用。", "install_truncated": "这些说明过长,无法在此显示 — 请打开文档。" }, "columns": { "integration": "集成", "description": "描述", "category": "分类", "status": "状态" }, "status": { "notConfigured": "未配置", "incomplete": "未完成", "enabled": "已启用", "disabled": "已禁用", "configured": "已配置", "connected": "已连接", "connectionFailed": "连接失败" }, "meta": { "version": "v{{version}}", "authorPrefix": "由" }, "labels": { "category": "分类" }, "categories": { "payment": "支付", "notification": "通知", "fulfillment": "履约", "search": "搜索", "content": "内容", "analytics": "分析", "authentication": "身份验证", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "市场", "feed": "数据源", "file_providers": "文件供应商", "other": "其他" }, "actions": { "test": "测试连接", "enable": "启用", "disable": "禁用", "delete": "删除", "edit": "编辑", "save": "保存", "cancel": "取消" }, "delete": { "title": "删除配置", "description": "移除 {{name}} 的已保存配置?此操作无法撤销。" }, "form": { "required": "{{field}} 为必填项", "invalidJson": "无效的 JSON", "keepSecret": "•••••• – 留空以保持不变", "items": "{{count}} 项" }, "toast": { "saved": "已保存", "saveFailed": "保存失败", "connectionOk": "连接成功", "testFailed": "测试失败", "enabled": "已启用", "disabled": "已禁用", "deleted": "配置已删除", "deleteFailed": "删除失败", "updateFailed": "更新失败" }, "unknown": "未知集成“{{id}}”。", "back": "返回集成" };
|
|
3379
|
+
const zhCN = {
|
|
3380
|
+
integration: integration$1
|
|
3381
|
+
};
|
|
3382
|
+
const integration = { "list": { "title": "整合", "subtitle": "管理整合設定", "browseIntegrations": "瀏覽整合", "learnMore": "了解如何建立整合", "searchPlaceholder": "搜尋整合", "empty": "尚未註冊任何整合。請在 medusa-config 中整合外掛的 options.providers 下宣告提供者。", "emptyFiltered": "沒有符合篩選條件的整合。", "tested": "已測試", "testFailed": "測試失敗", "tabs": { "all": "全部" } }, "browse": { "title": "目錄", "subtitle": "尋找可用的整合", "publish": "新增整合", "learnMore": "了解如何建立並發布您自己的整合", "searchPlaceholder": "搜尋整合", "by": "由 {{author}} 提供", "installed": "已安裝", "notInstalled": "未安裝", "add": "新增", "settings": "設定", "install_docs": "閱讀說明文件", "install_empty": "此整合的設定說明尚未提供。", "install_truncated": "這些說明過長,無法在此顯示 — 請開啟說明文件。" }, "columns": { "integration": "整合", "description": "描述", "category": "分類", "status": "狀態" }, "status": { "notConfigured": "未設定", "incomplete": "未完成", "enabled": "已啟用", "disabled": "已停用", "configured": "已設定", "connected": "已連線", "connectionFailed": "連線失敗" }, "meta": { "version": "v{{version}}", "authorPrefix": "由" }, "labels": { "category": "分類" }, "categories": { "payment": "付款", "notification": "通知", "fulfillment": "出貨", "search": "搜尋", "content": "內容", "analytics": "分析", "authentication": "驗證", "erp": "ERP", "crm": "CRM", "pim": "PIM", "marketplace": "市集", "feed": "資料來源", "file_providers": "檔案提供者", "other": "其他" }, "actions": { "test": "測試連線", "enable": "啟用", "disable": "停用", "delete": "刪除", "edit": "編輯", "save": "儲存", "cancel": "取消" }, "delete": { "title": "刪除設定", "description": "移除 {{name}} 的已儲存設定?此操作無法復原。" }, "form": { "required": "{{field}} 為必填", "invalidJson": "無效的 JSON", "keepSecret": "•••••• – 留空以保持不變", "items": "{{count}} 項" }, "toast": { "saved": "已儲存", "saveFailed": "儲存失敗", "connectionOk": "連線成功", "testFailed": "測試失敗", "enabled": "已啟用", "disabled": "已停用", "deleted": "設定已刪除", "deleteFailed": "刪除失敗", "updateFailed": "更新失敗" }, "unknown": "未知的整合「{{id}}」。", "back": "返回整合" };
|
|
3383
|
+
const zhTW = {
|
|
2806
3384
|
integration
|
|
2807
3385
|
};
|
|
2808
3386
|
const i18nTranslations0 = {
|
|
3387
|
+
ar: { translation: ar },
|
|
3388
|
+
bg: { translation: bg },
|
|
3389
|
+
bs: { translation: bs },
|
|
3390
|
+
cs: { translation: cs },
|
|
3391
|
+
de: { translation: de },
|
|
3392
|
+
el: { translation: el },
|
|
2809
3393
|
en: { translation: en },
|
|
2810
|
-
|
|
3394
|
+
enGB: { translation: enGB },
|
|
3395
|
+
es: { translation: es },
|
|
3396
|
+
fa: { translation: fa },
|
|
3397
|
+
fr: { translation: fr },
|
|
3398
|
+
he: { translation: he },
|
|
3399
|
+
hr: { translation: hr },
|
|
3400
|
+
hu: { translation: hu },
|
|
3401
|
+
id: { translation: id },
|
|
3402
|
+
it: { translation: it },
|
|
3403
|
+
ja: { translation: ja },
|
|
3404
|
+
ko: { translation: ko },
|
|
3405
|
+
lt: { translation: lt },
|
|
3406
|
+
mk: { translation: mk },
|
|
3407
|
+
mn: { translation: mn },
|
|
3408
|
+
nl: { translation: nl },
|
|
3409
|
+
pl: { translation: pl },
|
|
3410
|
+
ptBR: { translation: ptBR },
|
|
3411
|
+
ptPT: { translation: ptPT },
|
|
3412
|
+
ro: { translation: ro },
|
|
3413
|
+
ru: { translation: ru },
|
|
3414
|
+
th: { translation: th },
|
|
3415
|
+
tr: { translation: tr },
|
|
3416
|
+
uk: { translation: uk },
|
|
3417
|
+
vi: { translation: vi },
|
|
3418
|
+
zhCN: { translation: zhCN },
|
|
3419
|
+
zhTW: { translation: zhTW }
|
|
2811
3420
|
};
|
|
2812
3421
|
const widgetModule = { widgets: [] };
|
|
2813
3422
|
const routeModule = {
|