@dev-fastn-ai/react-core 2.3.9 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +48 -467
- package/dist/core/provider.d.ts +2 -2
- package/dist/core/use-configuration-form.d.ts +2 -2
- package/dist/core/use-configurations.d.ts +2 -2
- package/dist/core/use-field-options.d.ts +4 -6
- package/dist/index.cjs.js +9 -45
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +9 -11
- package/dist/index.esm.js +10 -46
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `useFieldOptions` hook now supports passing context data to `getOptions` and `loadMore` methods
|
|
12
|
+
- Context parameter allows passing form data or additional parameters for dynamic option filtering
|
|
13
|
+
- Support for cascading dropdowns and context-dependent option loading
|
|
14
|
+
|
|
8
15
|
## [1.0.0] - 2024-01-XX
|
|
9
16
|
|
|
10
17
|
### Added
|
package/README.md
CHANGED
|
@@ -257,22 +257,6 @@ interface ConnectorField {
|
|
|
257
257
|
| Primitive
|
|
258
258
|
| Primitive[];
|
|
259
259
|
readonly optionsSource?: SelectOptionSource;
|
|
260
|
-
readonly configs?: {
|
|
261
|
-
selection?: {
|
|
262
|
-
enable?: boolean;
|
|
263
|
-
type?: "MAPPING" | string;
|
|
264
|
-
isAddFields?: boolean;
|
|
265
|
-
isEditKeys?: boolean;
|
|
266
|
-
source?: {
|
|
267
|
-
flowId: string;
|
|
268
|
-
isSameProject: boolean;
|
|
269
|
-
};
|
|
270
|
-
destination?: {
|
|
271
|
-
flowId: string;
|
|
272
|
-
isSameProject: boolean;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
260
|
}
|
|
277
261
|
```
|
|
278
262
|
|
|
@@ -577,7 +561,6 @@ The form fields handle different value types based on the field type:
|
|
|
577
561
|
- **Select fields**: Always return `{ label: string, value: string }` objects
|
|
578
562
|
- **Multi-select fields**: Always return `{ label: string, value: string }[]` arrays
|
|
579
563
|
- **Google Drive picker fields**: Always return `{ label: string, value: string }` objects or arrays
|
|
580
|
-
- **Mapping fields**: Always return `{ label: string, value: string }[]` arrays where `label` is the source field and `value` is the destination field
|
|
581
564
|
- **Other fields**: Return primitive values (string, number, boolean)
|
|
582
565
|
|
|
583
566
|
```tsx
|
|
@@ -601,13 +584,6 @@ const formData = {
|
|
|
601
584
|
{ label: "document2.pdf", value: "file_id_2" }
|
|
602
585
|
],
|
|
603
586
|
|
|
604
|
-
// Mapping field - array of mapping objects
|
|
605
|
-
fieldMappings: [
|
|
606
|
-
{ label: "First Name", value: "user_first_name" },
|
|
607
|
-
{ label: "Email Address", value: "user_email" },
|
|
608
|
-
{ label: "Phone Number", value: "user_phone" }
|
|
609
|
-
],
|
|
610
|
-
|
|
611
587
|
// Text field - primitive
|
|
612
588
|
webhookUrl: "https://hooks.slack.com/...",
|
|
613
589
|
|
|
@@ -627,7 +603,7 @@ For fields of type `select` or `multi-select`, use the `useFieldOptions` hook to
|
|
|
627
603
|
```tsx
|
|
628
604
|
import { useFieldOptions } from "@fastn-ai/react-core";
|
|
629
605
|
|
|
630
|
-
function SelectField({ field, value, onChange, isMulti = false }) {
|
|
606
|
+
function SelectField({ field, value, onChange, isMulti = false, context }) {
|
|
631
607
|
const {
|
|
632
608
|
options,
|
|
633
609
|
loading,
|
|
@@ -637,7 +613,7 @@ function SelectField({ field, value, onChange, isMulti = false }) {
|
|
|
637
613
|
error,
|
|
638
614
|
search,
|
|
639
615
|
totalLoadedOptions,
|
|
640
|
-
} = useFieldOptions(field);
|
|
616
|
+
} = useFieldOptions(field, context);
|
|
641
617
|
|
|
642
618
|
function handleInputChange(e) {
|
|
643
619
|
search(e.target.value);
|
|
@@ -737,6 +713,52 @@ function SelectField({ field, value, onChange, isMulti = false }) {
|
|
|
737
713
|
}
|
|
738
714
|
```
|
|
739
715
|
|
|
716
|
+
#### **Using Context with Select Fields**
|
|
717
|
+
|
|
718
|
+
The `useFieldOptions` hook now supports passing context data to the `getOptions` and `loadMore` methods. This is useful when you need to pass additional form data or parameters to filter or customize the options:
|
|
719
|
+
|
|
720
|
+
```tsx
|
|
721
|
+
function SelectFieldWithContext({ field, value, onChange, formData }) {
|
|
722
|
+
// Pass form data as context to the hook
|
|
723
|
+
const context = formData; // This will be passed to getOptions and loadMore
|
|
724
|
+
|
|
725
|
+
const {
|
|
726
|
+
options,
|
|
727
|
+
loading,
|
|
728
|
+
loadingMore,
|
|
729
|
+
hasNext,
|
|
730
|
+
loadMore,
|
|
731
|
+
error,
|
|
732
|
+
search,
|
|
733
|
+
totalLoadedOptions,
|
|
734
|
+
} = useFieldOptions(field, context);
|
|
735
|
+
|
|
736
|
+
// ... rest of the component logic remains the same
|
|
737
|
+
}
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
**When to use context:**
|
|
741
|
+
- When options depend on other form field values
|
|
742
|
+
- When you need to pass authentication tokens or user-specific data
|
|
743
|
+
- When implementing cascading dropdowns (e.g., country → state → city)
|
|
744
|
+
- When options need to be filtered based on current form state
|
|
745
|
+
|
|
746
|
+
**Example with cascading dropdowns:**
|
|
747
|
+
```tsx
|
|
748
|
+
function CascadingSelectField({ field, value, onChange, parentValue }) {
|
|
749
|
+
// Create context with parent field value
|
|
750
|
+
const context = {
|
|
751
|
+
parentField: parentValue,
|
|
752
|
+
// Add other relevant form data
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
const { options, loading, error, search } = useFieldOptions(field, context);
|
|
756
|
+
|
|
757
|
+
// The getOptions method in your field.optionsSource will receive this context
|
|
758
|
+
// and can use it to filter options based on the parent selection
|
|
759
|
+
}
|
|
760
|
+
```
|
|
761
|
+
|
|
740
762
|
### **Google Drive Picker Fields**
|
|
741
763
|
|
|
742
764
|
For Google Drive file picker fields, handle the file selection flow. These fields also work with `{ label, value }` objects:
|
|
@@ -805,438 +827,6 @@ function GoogleFilesPickerField({ field, value, onChange, isMulti = false }) {
|
|
|
805
827
|
}
|
|
806
828
|
```
|
|
807
829
|
|
|
808
|
-
### **Mapping Fields**
|
|
809
|
-
|
|
810
|
-
Mapping fields allow users to create relationships between source fields and destination fields. They are commonly used for data transformation scenarios where you need to map fields from one system to another (e.g., mapping CSV columns to database fields, or API response fields to form inputs).
|
|
811
|
-
|
|
812
|
-
#### **Field Type and Value Structure**
|
|
813
|
-
|
|
814
|
-
Mapping fields use the `ConnectorFieldType.MAPPING` type and always work with arrays of mapping objects:
|
|
815
|
-
|
|
816
|
-
```tsx
|
|
817
|
-
// Mapping field value structure
|
|
818
|
-
const mappingValue = [
|
|
819
|
-
{
|
|
820
|
-
label: "Source Field Name", // The source field identifier
|
|
821
|
-
value: "destination_value" // The selected destination field value
|
|
822
|
-
},
|
|
823
|
-
{
|
|
824
|
-
label: "Email Address",
|
|
825
|
-
value: "user_email"
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
label: "Full Name",
|
|
829
|
-
value: "display_name"
|
|
830
|
-
}
|
|
831
|
-
];
|
|
832
|
-
```
|
|
833
|
-
|
|
834
|
-
#### **Field Configuration**
|
|
835
|
-
|
|
836
|
-
Mapping fields require specific configuration in the `ConnectorField`:
|
|
837
|
-
|
|
838
|
-
```tsx
|
|
839
|
-
interface MappingFieldConfig {
|
|
840
|
-
// Field type must be "mapping"
|
|
841
|
-
type: "mapping";
|
|
842
|
-
|
|
843
|
-
// Configuration for source and destination options
|
|
844
|
-
configs: {
|
|
845
|
-
selection: {
|
|
846
|
-
// Enable mapping functionality
|
|
847
|
-
enable: true;
|
|
848
|
-
type: "MAPPING";
|
|
849
|
-
|
|
850
|
-
// Configuration for adding/editing fields
|
|
851
|
-
isAddFields?: boolean; // Allow users to add new source fields
|
|
852
|
-
isEditKeys?: boolean; // Allow users to edit source field names
|
|
853
|
-
|
|
854
|
-
// Source options configuration
|
|
855
|
-
source: {
|
|
856
|
-
flowId: string; // ID of the flow providing source options
|
|
857
|
-
isSameProject: boolean; // Whether source is in same project
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
// Destination options configuration
|
|
861
|
-
destination: {
|
|
862
|
-
flowId: string; // ID of the flow providing destination options
|
|
863
|
-
isSameProject: boolean; // Whether destination is in same project
|
|
864
|
-
};
|
|
865
|
-
};
|
|
866
|
-
};
|
|
867
|
-
|
|
868
|
-
// Options source for dynamic loading
|
|
869
|
-
optionsSource: {
|
|
870
|
-
getOptions: (pagination, context, searchQuery) => Promise<OptionsResult>;
|
|
871
|
-
};
|
|
872
|
-
}
|
|
873
|
-
```
|
|
874
|
-
|
|
875
|
-
#### **Complete Mapping Field Component**
|
|
876
|
-
|
|
877
|
-
Here's a full implementation of a mapping field component using the `useFieldOptions` hook:
|
|
878
|
-
|
|
879
|
-
```tsx
|
|
880
|
-
import { useCallback, useState, useEffect } from "react";
|
|
881
|
-
import { useFieldOptions } from "@fastn-ai/react-core";
|
|
882
|
-
import Select from "react-select";
|
|
883
|
-
|
|
884
|
-
interface MappingFieldProps {
|
|
885
|
-
field: ConnectorField;
|
|
886
|
-
value: MappingValue[];
|
|
887
|
-
onChange: (value: MappingValue[]) => void;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
interface MappingValue {
|
|
891
|
-
label: string; // Source field name
|
|
892
|
-
value: string; // Destination field value
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
function MappingField({ field, value, onChange }: MappingFieldProps) {
|
|
896
|
-
// Get mapping-specific functions from useFieldOptions
|
|
897
|
-
const {
|
|
898
|
-
selectionConfig,
|
|
899
|
-
getSourceOptions,
|
|
900
|
-
getDestinationOptions,
|
|
901
|
-
} = useFieldOptions(field);
|
|
902
|
-
|
|
903
|
-
const mappingValue = Array.isArray(value) ? value : [];
|
|
904
|
-
|
|
905
|
-
// State for source and destination options
|
|
906
|
-
const [sourceOptions, setSourceOptions] = useState<SelectOption[]>([]);
|
|
907
|
-
const [destinationOptions, setDestinationOptions] = useState<SelectOption[]>([]);
|
|
908
|
-
const [sourceLoading, setSourceLoading] = useState(false);
|
|
909
|
-
const [destinationLoading, setDestinationLoading] = useState(false);
|
|
910
|
-
|
|
911
|
-
// Initialize source options from existing mappings
|
|
912
|
-
const initialSourceOptions = mappingValue.length > 0
|
|
913
|
-
? mappingValue.map((item) => ({
|
|
914
|
-
label: item.label,
|
|
915
|
-
value: item.label,
|
|
916
|
-
}))
|
|
917
|
-
: [];
|
|
918
|
-
|
|
919
|
-
// Load source options
|
|
920
|
-
const loadSourceOptions = useCallback(async () => {
|
|
921
|
-
setSourceLoading(true);
|
|
922
|
-
try {
|
|
923
|
-
const result = await getSourceOptions({ id: "configurationId" });
|
|
924
|
-
const rawOptions = result?.options || [];
|
|
925
|
-
|
|
926
|
-
const newSourceOptions = Array.isArray(rawOptions)
|
|
927
|
-
? rawOptions.map((option) =>
|
|
928
|
-
typeof option === "string"
|
|
929
|
-
? { label: option, value: option }
|
|
930
|
-
: option
|
|
931
|
-
)
|
|
932
|
-
: [];
|
|
933
|
-
setSourceOptions(newSourceOptions);
|
|
934
|
-
} catch (err) {
|
|
935
|
-
console.error("Error loading source options:", err);
|
|
936
|
-
} finally {
|
|
937
|
-
setSourceLoading(false);
|
|
938
|
-
}
|
|
939
|
-
}, [getSourceOptions]);
|
|
940
|
-
|
|
941
|
-
// Load destination options
|
|
942
|
-
const loadDestinationOptions = useCallback(async () => {
|
|
943
|
-
setDestinationLoading(true);
|
|
944
|
-
try {
|
|
945
|
-
const result = await getDestinationOptions({ id: "configurationId" });
|
|
946
|
-
const rawOptions = result?.options || [];
|
|
947
|
-
|
|
948
|
-
const newDestinationOptions = Array.isArray(rawOptions)
|
|
949
|
-
? rawOptions.map((option) =>
|
|
950
|
-
typeof option === "string"
|
|
951
|
-
? { label: option, value: option }
|
|
952
|
-
: option
|
|
953
|
-
)
|
|
954
|
-
: [];
|
|
955
|
-
setDestinationOptions(newDestinationOptions);
|
|
956
|
-
} catch (err) {
|
|
957
|
-
console.error("Error loading destination options:", err);
|
|
958
|
-
} finally {
|
|
959
|
-
setDestinationLoading(false);
|
|
960
|
-
}
|
|
961
|
-
}, [getDestinationOptions]);
|
|
962
|
-
|
|
963
|
-
// Load options on mount
|
|
964
|
-
useEffect(() => {
|
|
965
|
-
// Load source options only if no existing mappings
|
|
966
|
-
if (mappingValue.length === 0) {
|
|
967
|
-
loadSourceOptions();
|
|
968
|
-
} else {
|
|
969
|
-
setSourceOptions(initialSourceOptions);
|
|
970
|
-
}
|
|
971
|
-
loadDestinationOptions();
|
|
972
|
-
}, []);
|
|
973
|
-
|
|
974
|
-
// Add new mapping field
|
|
975
|
-
const handleAddField = () => {
|
|
976
|
-
const newFieldLabel = `Field ${sourceOptions.length + 1}`;
|
|
977
|
-
const newSourceOption = {
|
|
978
|
-
label: newFieldLabel,
|
|
979
|
-
value: newFieldLabel,
|
|
980
|
-
};
|
|
981
|
-
|
|
982
|
-
setSourceOptions([...sourceOptions, newSourceOption]);
|
|
983
|
-
|
|
984
|
-
const newMappingValue = [
|
|
985
|
-
...mappingValue,
|
|
986
|
-
{
|
|
987
|
-
label: newFieldLabel,
|
|
988
|
-
value: "",
|
|
989
|
-
},
|
|
990
|
-
];
|
|
991
|
-
onChange(newMappingValue);
|
|
992
|
-
};
|
|
993
|
-
|
|
994
|
-
// Remove mapping field
|
|
995
|
-
const handleRemoveField = (sourceOption: SelectOption, index: number) => {
|
|
996
|
-
const newSourceOptions = sourceOptions.filter((_, i) => i !== index);
|
|
997
|
-
setSourceOptions(newSourceOptions);
|
|
998
|
-
|
|
999
|
-
const newMappingValue = mappingValue.filter(
|
|
1000
|
-
(mapping) => mapping.label !== sourceOption.label
|
|
1001
|
-
);
|
|
1002
|
-
onChange(newMappingValue);
|
|
1003
|
-
};
|
|
1004
|
-
|
|
1005
|
-
// Update source field label
|
|
1006
|
-
const handleSourceLabelChange = (index: number, sourceOption: SelectOption, newLabel: string) => {
|
|
1007
|
-
const newSourceOptions = [...sourceOptions];
|
|
1008
|
-
newSourceOptions[index] = {
|
|
1009
|
-
...sourceOption,
|
|
1010
|
-
label: newLabel,
|
|
1011
|
-
};
|
|
1012
|
-
setSourceOptions(newSourceOptions);
|
|
1013
|
-
|
|
1014
|
-
const existingIndex = mappingValue.findIndex(
|
|
1015
|
-
(mapping) => mapping.label === sourceOption.label
|
|
1016
|
-
);
|
|
1017
|
-
if (existingIndex >= 0) {
|
|
1018
|
-
const newMappingValue = [...mappingValue];
|
|
1019
|
-
newMappingValue[existingIndex] = {
|
|
1020
|
-
label: newLabel,
|
|
1021
|
-
value: newMappingValue[existingIndex].value,
|
|
1022
|
-
};
|
|
1023
|
-
onChange(newMappingValue);
|
|
1024
|
-
}
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
// Update destination mapping
|
|
1028
|
-
const handleDestinationChange = (sourceOption: SelectOption, selected: SelectOption | null) => {
|
|
1029
|
-
const existingIndex = mappingValue.findIndex(
|
|
1030
|
-
(mapping) => mapping.label === sourceOption.label
|
|
1031
|
-
);
|
|
1032
|
-
|
|
1033
|
-
let newValue;
|
|
1034
|
-
if (existingIndex >= 0) {
|
|
1035
|
-
// Update existing mapping
|
|
1036
|
-
newValue = [...mappingValue];
|
|
1037
|
-
newValue[existingIndex] = {
|
|
1038
|
-
label: sourceOption.label,
|
|
1039
|
-
value: selected?.value || "",
|
|
1040
|
-
};
|
|
1041
|
-
} else {
|
|
1042
|
-
// Add new mapping
|
|
1043
|
-
newValue = [
|
|
1044
|
-
...mappingValue,
|
|
1045
|
-
{
|
|
1046
|
-
label: sourceOption.label,
|
|
1047
|
-
value: selected?.value || "",
|
|
1048
|
-
},
|
|
1049
|
-
];
|
|
1050
|
-
}
|
|
1051
|
-
onChange(newValue);
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
return (
|
|
1055
|
-
<div className="mapping-field-container">
|
|
1056
|
-
{/* Field label and add button */}
|
|
1057
|
-
<div className="mapping-field-header">
|
|
1058
|
-
<label className="field-label">
|
|
1059
|
-
{field.label}
|
|
1060
|
-
{field.required && <span className="required"> *</span>}
|
|
1061
|
-
</label>
|
|
1062
|
-
|
|
1063
|
-
{selectionConfig?.isAddFields && (
|
|
1064
|
-
<button
|
|
1065
|
-
type="button"
|
|
1066
|
-
onClick={handleAddField}
|
|
1067
|
-
className="add-field-btn"
|
|
1068
|
-
>
|
|
1069
|
-
+ Add Field
|
|
1070
|
-
</button>
|
|
1071
|
-
)}
|
|
1072
|
-
</div>
|
|
1073
|
-
|
|
1074
|
-
{/* Loading state */}
|
|
1075
|
-
{sourceLoading ? (
|
|
1076
|
-
<div className="loading-message">Loading source options...</div>
|
|
1077
|
-
) : sourceOptions.length > 0 ? (
|
|
1078
|
-
/* Mapping rows */
|
|
1079
|
-
sourceOptions.map((sourceOption, index) => (
|
|
1080
|
-
<div key={index} className="mapping-row">
|
|
1081
|
-
{/* Source field (editable if configured) */}
|
|
1082
|
-
<div className="source-field">
|
|
1083
|
-
{selectionConfig?.isEditKeys ? (
|
|
1084
|
-
<EditableLabel
|
|
1085
|
-
value={sourceOption.label}
|
|
1086
|
-
onSave={(newLabel) =>
|
|
1087
|
-
handleSourceLabelChange(index, sourceOption, newLabel)
|
|
1088
|
-
}
|
|
1089
|
-
/>
|
|
1090
|
-
) : (
|
|
1091
|
-
<span className="source-label">{sourceOption.label}</span>
|
|
1092
|
-
)}
|
|
1093
|
-
</div>
|
|
1094
|
-
|
|
1095
|
-
{/* Arrow separator */}
|
|
1096
|
-
<div className="mapping-arrow">→</div>
|
|
1097
|
-
|
|
1098
|
-
{/* Destination field selector */}
|
|
1099
|
-
<div className="destination-field">
|
|
1100
|
-
<Select
|
|
1101
|
-
value={(() => {
|
|
1102
|
-
const mapping = mappingValue.find(
|
|
1103
|
-
(mapping) => mapping.label === sourceOption.label
|
|
1104
|
-
);
|
|
1105
|
-
return mapping
|
|
1106
|
-
? destinationOptions.find(
|
|
1107
|
-
(option) => option.value === mapping.value
|
|
1108
|
-
) || null
|
|
1109
|
-
: null;
|
|
1110
|
-
})()}
|
|
1111
|
-
onChange={(selected) =>
|
|
1112
|
-
handleDestinationChange(sourceOption, selected)
|
|
1113
|
-
}
|
|
1114
|
-
options={destinationOptions}
|
|
1115
|
-
isLoading={destinationLoading}
|
|
1116
|
-
placeholder="Select destination..."
|
|
1117
|
-
className="destination-select"
|
|
1118
|
-
noOptionsMessage={() =>
|
|
1119
|
-
destinationLoading
|
|
1120
|
-
? "Loading destination options..."
|
|
1121
|
-
: "No destination options found"
|
|
1122
|
-
}
|
|
1123
|
-
/>
|
|
1124
|
-
</div>
|
|
1125
|
-
|
|
1126
|
-
{/* Remove field button */}
|
|
1127
|
-
{selectionConfig?.isAddFields && (
|
|
1128
|
-
<button
|
|
1129
|
-
type="button"
|
|
1130
|
-
onClick={() => handleRemoveField(sourceOption, index)}
|
|
1131
|
-
className="remove-field-btn"
|
|
1132
|
-
>
|
|
1133
|
-
🗑️
|
|
1134
|
-
</button>
|
|
1135
|
-
)}
|
|
1136
|
-
</div>
|
|
1137
|
-
))
|
|
1138
|
-
) : (
|
|
1139
|
-
<div className="no-options-message">No source options available</div>
|
|
1140
|
-
)}
|
|
1141
|
-
|
|
1142
|
-
{field.description && (
|
|
1143
|
-
<div className="field-description">{field.description}</div>
|
|
1144
|
-
)}
|
|
1145
|
-
</div>
|
|
1146
|
-
);
|
|
1147
|
-
}
|
|
1148
|
-
```
|
|
1149
|
-
|
|
1150
|
-
#### **useFieldOptions Hook for Mapping Fields**
|
|
1151
|
-
|
|
1152
|
-
The `useFieldOptions` hook provides specialized functions for mapping fields:
|
|
1153
|
-
|
|
1154
|
-
```tsx
|
|
1155
|
-
const {
|
|
1156
|
-
// Configuration from field.configs.selection
|
|
1157
|
-
selectionConfig: {
|
|
1158
|
-
isAddFields: boolean; // Allow adding new source fields
|
|
1159
|
-
isEditKeys: boolean; // Allow editing source field names
|
|
1160
|
-
source: { // Source options configuration
|
|
1161
|
-
flowId: string;
|
|
1162
|
-
isSameProject: boolean;
|
|
1163
|
-
};
|
|
1164
|
-
destination: { // Destination options configuration
|
|
1165
|
-
flowId: string;
|
|
1166
|
-
isSameProject: boolean;
|
|
1167
|
-
};
|
|
1168
|
-
},
|
|
1169
|
-
|
|
1170
|
-
// Function to load source options
|
|
1171
|
-
getSourceOptions: (context: any) => Promise<OptionsResult>;
|
|
1172
|
-
|
|
1173
|
-
// Function to load destination options
|
|
1174
|
-
getDestinationOptions: (context: any) => Promise<OptionsResult>;
|
|
1175
|
-
|
|
1176
|
-
// Standard field options (for non-mapping fields)
|
|
1177
|
-
options: SelectOption[];
|
|
1178
|
-
loading: boolean;
|
|
1179
|
-
// ... other standard options
|
|
1180
|
-
} = useFieldOptions(field);
|
|
1181
|
-
```
|
|
1182
|
-
|
|
1183
|
-
#### **Mapping Field Usage Example**
|
|
1184
|
-
|
|
1185
|
-
```tsx
|
|
1186
|
-
function ConfigurationForm({ configurationId }) {
|
|
1187
|
-
const { data: configurationForm } = useConfigurationForm({ configurationId });
|
|
1188
|
-
const [formData, setFormData] = useState({});
|
|
1189
|
-
|
|
1190
|
-
return (
|
|
1191
|
-
<form>
|
|
1192
|
-
{configurationForm?.fields.map((field) => {
|
|
1193
|
-
if (field.type === "mapping") {
|
|
1194
|
-
return (
|
|
1195
|
-
<MappingField
|
|
1196
|
-
key={field.key}
|
|
1197
|
-
field={field}
|
|
1198
|
-
value={formData[field.key] || []}
|
|
1199
|
-
onChange={(value) =>
|
|
1200
|
-
setFormData((prev) => ({ ...prev, [field.key]: value }))
|
|
1201
|
-
}
|
|
1202
|
-
/>
|
|
1203
|
-
);
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
// Handle other field types...
|
|
1207
|
-
return <FormField key={field.key} field={field} />;
|
|
1208
|
-
})}
|
|
1209
|
-
</form>
|
|
1210
|
-
);
|
|
1211
|
-
}
|
|
1212
|
-
```
|
|
1213
|
-
|
|
1214
|
-
#### **Common Mapping Field Use Cases**
|
|
1215
|
-
|
|
1216
|
-
1. **CSV Column Mapping**: Map CSV headers to database fields
|
|
1217
|
-
2. **API Response Mapping**: Map API response fields to form inputs
|
|
1218
|
-
3. **Data Transformation**: Map source data fields to destination schema
|
|
1219
|
-
4. **Integration Field Mapping**: Map fields between different systems (CRM to Email Marketing, etc.)
|
|
1220
|
-
|
|
1221
|
-
```tsx
|
|
1222
|
-
// Example mapping values for different use cases
|
|
1223
|
-
|
|
1224
|
-
// CSV to Database mapping
|
|
1225
|
-
const csvMappingValue = [
|
|
1226
|
-
{ label: "First Name", value: "user_first_name" },
|
|
1227
|
-
{ label: "Last Name", value: "user_last_name" },
|
|
1228
|
-
{ label: "Email", value: "user_email" },
|
|
1229
|
-
{ label: "Phone", value: "user_phone" }
|
|
1230
|
-
];
|
|
1231
|
-
|
|
1232
|
-
// API Response to Form mapping
|
|
1233
|
-
const apiMappingValue = [
|
|
1234
|
-
{ label: "api_user_id", value: "userId" },
|
|
1235
|
-
{ label: "api_user_email", value: "email" },
|
|
1236
|
-
{ label: "api_user_profile", value: "profile" }
|
|
1237
|
-
];
|
|
1238
|
-
```
|
|
1239
|
-
|
|
1240
830
|
### **Generic Form Field Component**
|
|
1241
831
|
|
|
1242
832
|
Create a reusable component that handles different field types with proper value handling:
|
|
@@ -1328,15 +918,6 @@ function FormField({ field, value, onChange }) {
|
|
|
1328
918
|
/>
|
|
1329
919
|
);
|
|
1330
920
|
|
|
1331
|
-
case "mapping":
|
|
1332
|
-
return (
|
|
1333
|
-
<MappingField
|
|
1334
|
-
field={field}
|
|
1335
|
-
value={value || []}
|
|
1336
|
-
onChange={onChange}
|
|
1337
|
-
/>
|
|
1338
|
-
);
|
|
1339
|
-
|
|
1340
921
|
default:
|
|
1341
922
|
return (
|
|
1342
923
|
<div className="field-container">
|
package/dist/core/provider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryClient } from "@tanstack/react-query";
|
|
2
|
-
import { Fastn } from "@
|
|
3
|
-
import type { FastnConfig } from "@
|
|
2
|
+
import { Fastn } from "@fastn-ai/core";
|
|
3
|
+
import type { FastnConfig } from "@fastn-ai/core";
|
|
4
4
|
export declare const FastnProvider: ({ children, config, queryClient, }: {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
config: FastnConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GetConfigurationFormInput } from "@
|
|
2
|
-
export declare const useConfigurationForm: (input: GetConfigurationFormInput) => import("@tanstack/react-query").UseQueryResult<import("@
|
|
1
|
+
import { GetConfigurationFormInput } from "@fastn-ai/core";
|
|
2
|
+
export declare const useConfigurationForm: (input: GetConfigurationFormInput) => import("@tanstack/react-query").UseQueryResult<import("@fastn-ai/core").ConfigurationForm, Error>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GetConfigurationsInput } from "@
|
|
2
|
-
export declare const useConfigurations: (input: GetConfigurationsInput) => import("@tanstack/react-query").UseQueryResult<import("@
|
|
1
|
+
import { GetConfigurationsInput } from "@fastn-ai/core";
|
|
2
|
+
export declare const useConfigurations: (input: GetConfigurationsInput) => import("@tanstack/react-query").UseQueryResult<import("@fastn-ai/core").Configuration[], Error>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConnectorField, SelectOption,
|
|
1
|
+
import type { ConnectorField, SelectOption, FormData } from "@fastn-ai/core";
|
|
2
2
|
/**
|
|
3
3
|
* Custom hook to manage async select field options with search, pagination, and error handling using React Query.
|
|
4
4
|
*
|
|
@@ -11,21 +11,19 @@ import type { ConnectorField, SelectOption, OptionsResult } from "@dev-fastn-ai/
|
|
|
11
11
|
* - Cache invalidation and garbage collection
|
|
12
12
|
*
|
|
13
13
|
* @param field ConnectorField - The field definition containing optionsSource
|
|
14
|
+
* @param context FormData - Optional context data to pass to getOptions and loadMore methods
|
|
14
15
|
* @returns { options, loading, loadingMore, hasNext, query, refresh, search, loadMore, error }
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* ```tsx
|
|
18
|
-
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field);
|
|
19
|
+
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field, context);
|
|
19
20
|
*
|
|
20
21
|
* // Options are automatically cached and shared across components
|
|
21
22
|
* // Loading states are handled automatically
|
|
22
23
|
* // Pagination is managed with infinite query
|
|
23
24
|
* ```
|
|
24
25
|
*/
|
|
25
|
-
export declare function useFieldOptions(field: ConnectorField): {
|
|
26
|
-
getSourceOptions: (context: any) => Promise<OptionsResult | null>;
|
|
27
|
-
getDestinationOptions: (context: any) => Promise<OptionsResult | null>;
|
|
28
|
-
selectionConfig: any;
|
|
26
|
+
export declare function useFieldOptions(field: ConnectorField, context?: FormData | object): {
|
|
29
27
|
options: SelectOption[];
|
|
30
28
|
loading: boolean;
|
|
31
29
|
loadingMore: boolean;
|
package/dist/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var reactQuery = require('@tanstack/react-query');
|
|
6
|
-
var core = require('@
|
|
6
|
+
var core = require('@fastn-ai/core');
|
|
7
7
|
|
|
8
8
|
const FastnContext = react.createContext(null);
|
|
9
9
|
const FastnProvider = ({ children, config, queryClient, }) => {
|
|
@@ -756,63 +756,29 @@ var debounce = /*@__PURE__*/getDefaultExportFromCjs(debounceExports);
|
|
|
756
756
|
* - Cache invalidation and garbage collection
|
|
757
757
|
*
|
|
758
758
|
* @param field ConnectorField - The field definition containing optionsSource
|
|
759
|
+
* @param context FormData - Optional context data to pass to getOptions and loadMore methods
|
|
759
760
|
* @returns { options, loading, loadingMore, hasNext, query, refresh, search, loadMore, error }
|
|
760
761
|
*
|
|
761
762
|
* @example
|
|
762
763
|
* ```tsx
|
|
763
|
-
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field);
|
|
764
|
+
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field, context);
|
|
764
765
|
*
|
|
765
766
|
* // Options are automatically cached and shared across components
|
|
766
767
|
* // Loading states are handled automatically
|
|
767
768
|
* // Pagination is managed with infinite query
|
|
768
769
|
* ```
|
|
769
770
|
*/
|
|
770
|
-
function useFieldOptions(field) {
|
|
771
|
+
function useFieldOptions(field, context) {
|
|
771
772
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
772
773
|
const [searchQuery, setSearchQuery] = react.useState("");
|
|
773
774
|
const queryClient = reactQuery.useQueryClient();
|
|
774
|
-
const configs = field === null || field === void 0 ? void 0 : field.configs;
|
|
775
|
-
const selection = configs === null || configs === void 0 ? void 0 : configs.selection;
|
|
776
|
-
const getSourceOptions = async (context) => {
|
|
777
|
-
var _a, _b, _c;
|
|
778
|
-
if (!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.getOptions))
|
|
779
|
-
return null;
|
|
780
|
-
const data = {
|
|
781
|
-
sameProjectFlow: (_b = selection === null || selection === void 0 ? void 0 : selection.source) === null || _b === void 0 ? void 0 : _b.isSameProject,
|
|
782
|
-
sourceId: (_c = selection === null || selection === void 0 ? void 0 : selection.source) === null || _c === void 0 ? void 0 : _c.flowId,
|
|
783
|
-
sourceProject: "",
|
|
784
|
-
limit: 10,
|
|
785
|
-
offset: 0,
|
|
786
|
-
type: "OFFSET",
|
|
787
|
-
hasNextPage: false,
|
|
788
|
-
};
|
|
789
|
-
const res = await field.optionsSource.getOptions(data, context, searchQuery);
|
|
790
|
-
return res;
|
|
791
|
-
};
|
|
792
|
-
const getDestinationOptions = async (context) => {
|
|
793
|
-
var _a, _b, _c, _d;
|
|
794
|
-
console.log("selectionss", (_a = selection === null || selection === void 0 ? void 0 : selection.destination) === null || _a === void 0 ? void 0 : _a.flowId);
|
|
795
|
-
if (!((_b = field.optionsSource) === null || _b === void 0 ? void 0 : _b.getOptions))
|
|
796
|
-
return null;
|
|
797
|
-
const data = {
|
|
798
|
-
sameProjectFlow: (_c = selection === null || selection === void 0 ? void 0 : selection.destination) === null || _c === void 0 ? void 0 : _c.isSameProject,
|
|
799
|
-
sourceId: (_d = selection === null || selection === void 0 ? void 0 : selection.destination) === null || _d === void 0 ? void 0 : _d.flowId,
|
|
800
|
-
sourceProject: "",
|
|
801
|
-
limit: 10,
|
|
802
|
-
offset: 0,
|
|
803
|
-
type: "OFFSET",
|
|
804
|
-
hasNextPage: false,
|
|
805
|
-
};
|
|
806
|
-
const res = await field.optionsSource.getOptions(data, context, searchQuery);
|
|
807
|
-
return res;
|
|
808
|
-
};
|
|
809
775
|
// Generate a unique query key for this field
|
|
810
776
|
const queryKey = react.useMemo(() => {
|
|
811
777
|
return ["field-options", field.key, field.name];
|
|
812
778
|
}, [field.key, field.name]);
|
|
813
779
|
// Initial fetch query for static options or first page
|
|
814
780
|
const initialQuery = reactQuery.useQuery({
|
|
815
|
-
queryKey: [...queryKey, "initial", searchQuery],
|
|
781
|
+
queryKey: [...queryKey, "initial", searchQuery, context],
|
|
816
782
|
queryFn: async () => {
|
|
817
783
|
var _a, _b;
|
|
818
784
|
if (!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.getOptions))
|
|
@@ -826,7 +792,7 @@ function useFieldOptions(field) {
|
|
|
826
792
|
type: "OFFSET",
|
|
827
793
|
hasNextPage: false,
|
|
828
794
|
};
|
|
829
|
-
return await field.optionsSource.getOptions(pagination,
|
|
795
|
+
return await field.optionsSource.getOptions(pagination, context, searchQuery);
|
|
830
796
|
},
|
|
831
797
|
enabled: !!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.getOptions),
|
|
832
798
|
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
@@ -838,13 +804,13 @@ function useFieldOptions(field) {
|
|
|
838
804
|
}, 800), []);
|
|
839
805
|
// Infinite query for pagination
|
|
840
806
|
const infiniteQuery = reactQuery.useInfiniteQuery({
|
|
841
|
-
queryKey: [...queryKey, "infinite"],
|
|
807
|
+
queryKey: [...queryKey, "infinite", context],
|
|
842
808
|
queryFn: async ({ pageParam, }) => {
|
|
843
809
|
var _a;
|
|
844
810
|
if (!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.loadMore)) {
|
|
845
811
|
throw new Error("loadMore function not available");
|
|
846
812
|
}
|
|
847
|
-
return await field.optionsSource.loadMore(pageParam,
|
|
813
|
+
return await field.optionsSource.loadMore(pageParam, context);
|
|
848
814
|
},
|
|
849
815
|
initialPageParam: ((_c = (_b = field.optionsSource) === null || _b === void 0 ? void 0 : _b.pagination) !== null && _c !== void 0 ? _c : {
|
|
850
816
|
sourceId: "",
|
|
@@ -935,11 +901,9 @@ function useFieldOptions(field) {
|
|
|
935
901
|
infiniteQuery,
|
|
936
902
|
field.optionsSource,
|
|
937
903
|
field,
|
|
904
|
+
context,
|
|
938
905
|
]);
|
|
939
906
|
return {
|
|
940
|
-
getSourceOptions: getSourceOptions,
|
|
941
|
-
getDestinationOptions: getDestinationOptions,
|
|
942
|
-
selectionConfig: selection,
|
|
943
907
|
options: filteredOptions,
|
|
944
908
|
loading: initialQuery.isLoading || infiniteQuery.isLoading,
|
|
945
909
|
loadingMore: infiniteQuery.isFetchingNextPage,
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n"],"names":["global","require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,GAAE,IAAI,IAAI,GAAG,OAAO,KAAK;AACzB,GAAE,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,UAAU,CAAC;AAClE,CAAA;;AAEA,CAAA,UAAc,GAAG,QAAQ;;;;;;;;;;;;AC7BzB,CAAA,IAAI,UAAU,GAAG,OAAOA,cAAM,IAAI,QAAQ,IAAIA,cAAM,IAAIA,cAAM,CAAC,MAAM,KAAK,MAAM,IAAIA,cAAM;;AAE1F,CAAA,WAAc,GAAG,UAAU;;;;;;;;;;CCH3B,IAAI,UAAU,GAAGC,kBAAA,EAAwB;;AAEzC;AACA,CAAA,IAAI,QAAQ,GAAG,OAAO,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,IAAI;;AAEhF;CACA,IAAI,IAAI,GAAG,UAAU,IAAI,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE;;AAE9D,CAAA,KAAc,GAAG,IAAI;;;;;;;;;;CCRrB,IAAI,IAAI,GAAGA,YAAA,EAAkB;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AAI,CAAC;AAChD,SAAQ,OAAO,UAAU,CAAC,YAAY,CAAC;AACvC,OAAA;AACA,KAAA;AACA,KAAI,IAAI,OAAO,KAAK,SAAS,EAAE;AAC/B,OAAM,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC;AAC9C,KAAA;AACA,KAAI,OAAO,MAAM;AACjB,GAAA;AACA,GAAE,SAAS,CAAC,MAAM,GAAG,MAAM;AAC3B,GAAE,SAAS,CAAC,KAAK,GAAG,KAAK;AACzB,GAAE,OAAO,SAAS;AAClB,CAAA;;AAEA,CAAA,UAAc,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13]}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n deboun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AM;AACjB,GAAA;AACA,GAAE,SAAS,CAAC,MAAM,GAAG,MAAM;AAC3B,GAAE,SAAS,CAAC,KAAK,GAAG,KAAK;AACzB,GAAE,OAAO,SAAS;AAClB,CAAA;;AAEA,CAAA,UAAc,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
-
import * as
|
|
5
|
-
import { FastnConfig, GetConfigurationsInput, GetConfigurationFormInput, ConnectorField,
|
|
6
|
-
export * from '@
|
|
4
|
+
import * as _fastn_ai_core from '@fastn-ai/core';
|
|
5
|
+
import { FastnConfig, GetConfigurationsInput, GetConfigurationFormInput, ConnectorField, FormData, SelectOption } from '@fastn-ai/core';
|
|
6
|
+
export * from '@fastn-ai/core';
|
|
7
7
|
|
|
8
8
|
declare const FastnProvider: ({ children, config, queryClient, }: {
|
|
9
9
|
children: React.ReactNode;
|
|
@@ -11,11 +11,11 @@ declare const FastnProvider: ({ children, config, queryClient, }: {
|
|
|
11
11
|
queryClient?: QueryClient;
|
|
12
12
|
}) => react_jsx_runtime.JSX.Element;
|
|
13
13
|
|
|
14
|
-
declare const useConfigurations: (input: GetConfigurationsInput) => _tanstack_react_query.UseQueryResult<
|
|
14
|
+
declare const useConfigurations: (input: GetConfigurationsInput) => _tanstack_react_query.UseQueryResult<_fastn_ai_core.Configuration[], Error>;
|
|
15
15
|
|
|
16
|
-
declare const useConfigurationForm: (input: GetConfigurationFormInput) => _tanstack_react_query.UseQueryResult<
|
|
16
|
+
declare const useConfigurationForm: (input: GetConfigurationFormInput) => _tanstack_react_query.UseQueryResult<_fastn_ai_core.ConfigurationForm, Error>;
|
|
17
17
|
|
|
18
|
-
declare const useConnectors: () => _tanstack_react_query.UseQueryResult<
|
|
18
|
+
declare const useConnectors: () => _tanstack_react_query.UseQueryResult<_fastn_ai_core.Connector[], Error>;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Custom hook to manage async select field options with search, pagination, and error handling using React Query.
|
|
@@ -29,21 +29,19 @@ declare const useConnectors: () => _tanstack_react_query.UseQueryResult<_dev_fas
|
|
|
29
29
|
* - Cache invalidation and garbage collection
|
|
30
30
|
*
|
|
31
31
|
* @param field ConnectorField - The field definition containing optionsSource
|
|
32
|
+
* @param context FormData - Optional context data to pass to getOptions and loadMore methods
|
|
32
33
|
* @returns { options, loading, loadingMore, hasNext, query, refresh, search, loadMore, error }
|
|
33
34
|
*
|
|
34
35
|
* @example
|
|
35
36
|
* ```tsx
|
|
36
|
-
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field);
|
|
37
|
+
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field, context);
|
|
37
38
|
*
|
|
38
39
|
* // Options are automatically cached and shared across components
|
|
39
40
|
* // Loading states are handled automatically
|
|
40
41
|
* // Pagination is managed with infinite query
|
|
41
42
|
* ```
|
|
42
43
|
*/
|
|
43
|
-
declare function useFieldOptions(field: ConnectorField): {
|
|
44
|
-
getSourceOptions: (context: any) => Promise<OptionsResult | null>;
|
|
45
|
-
getDestinationOptions: (context: any) => Promise<OptionsResult | null>;
|
|
46
|
-
selectionConfig: any;
|
|
44
|
+
declare function useFieldOptions(field: ConnectorField, context?: FormData | object): {
|
|
47
45
|
options: SelectOption[];
|
|
48
46
|
loading: boolean;
|
|
49
47
|
loadingMore: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { createContext, useMemo, useContext, useEffect, useState, useCallback } from 'react';
|
|
3
3
|
import { QueryClientProvider, QueryClient, useQuery, useQueryClient, useInfiniteQuery } from '@tanstack/react-query';
|
|
4
|
-
import { Fastn } from '@
|
|
5
|
-
export * from '@
|
|
4
|
+
import { Fastn } from '@fastn-ai/core';
|
|
5
|
+
export * from '@fastn-ai/core';
|
|
6
6
|
|
|
7
7
|
const FastnContext = createContext(null);
|
|
8
8
|
const FastnProvider = ({ children, config, queryClient, }) => {
|
|
@@ -755,63 +755,29 @@ var debounce = /*@__PURE__*/getDefaultExportFromCjs(debounceExports);
|
|
|
755
755
|
* - Cache invalidation and garbage collection
|
|
756
756
|
*
|
|
757
757
|
* @param field ConnectorField - The field definition containing optionsSource
|
|
758
|
+
* @param context FormData - Optional context data to pass to getOptions and loadMore methods
|
|
758
759
|
* @returns { options, loading, loadingMore, hasNext, query, refresh, search, loadMore, error }
|
|
759
760
|
*
|
|
760
761
|
* @example
|
|
761
762
|
* ```tsx
|
|
762
|
-
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field);
|
|
763
|
+
* const { options, loading, loadingMore, hasNext, search, loadMore } = useFieldOptions(field, context);
|
|
763
764
|
*
|
|
764
765
|
* // Options are automatically cached and shared across components
|
|
765
766
|
* // Loading states are handled automatically
|
|
766
767
|
* // Pagination is managed with infinite query
|
|
767
768
|
* ```
|
|
768
769
|
*/
|
|
769
|
-
function useFieldOptions(field) {
|
|
770
|
+
function useFieldOptions(field, context) {
|
|
770
771
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
771
772
|
const [searchQuery, setSearchQuery] = useState("");
|
|
772
773
|
const queryClient = useQueryClient();
|
|
773
|
-
const configs = field === null || field === void 0 ? void 0 : field.configs;
|
|
774
|
-
const selection = configs === null || configs === void 0 ? void 0 : configs.selection;
|
|
775
|
-
const getSourceOptions = async (context) => {
|
|
776
|
-
var _a, _b, _c;
|
|
777
|
-
if (!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.getOptions))
|
|
778
|
-
return null;
|
|
779
|
-
const data = {
|
|
780
|
-
sameProjectFlow: (_b = selection === null || selection === void 0 ? void 0 : selection.source) === null || _b === void 0 ? void 0 : _b.isSameProject,
|
|
781
|
-
sourceId: (_c = selection === null || selection === void 0 ? void 0 : selection.source) === null || _c === void 0 ? void 0 : _c.flowId,
|
|
782
|
-
sourceProject: "",
|
|
783
|
-
limit: 10,
|
|
784
|
-
offset: 0,
|
|
785
|
-
type: "OFFSET",
|
|
786
|
-
hasNextPage: false,
|
|
787
|
-
};
|
|
788
|
-
const res = await field.optionsSource.getOptions(data, context, searchQuery);
|
|
789
|
-
return res;
|
|
790
|
-
};
|
|
791
|
-
const getDestinationOptions = async (context) => {
|
|
792
|
-
var _a, _b, _c, _d;
|
|
793
|
-
console.log("selectionss", (_a = selection === null || selection === void 0 ? void 0 : selection.destination) === null || _a === void 0 ? void 0 : _a.flowId);
|
|
794
|
-
if (!((_b = field.optionsSource) === null || _b === void 0 ? void 0 : _b.getOptions))
|
|
795
|
-
return null;
|
|
796
|
-
const data = {
|
|
797
|
-
sameProjectFlow: (_c = selection === null || selection === void 0 ? void 0 : selection.destination) === null || _c === void 0 ? void 0 : _c.isSameProject,
|
|
798
|
-
sourceId: (_d = selection === null || selection === void 0 ? void 0 : selection.destination) === null || _d === void 0 ? void 0 : _d.flowId,
|
|
799
|
-
sourceProject: "",
|
|
800
|
-
limit: 10,
|
|
801
|
-
offset: 0,
|
|
802
|
-
type: "OFFSET",
|
|
803
|
-
hasNextPage: false,
|
|
804
|
-
};
|
|
805
|
-
const res = await field.optionsSource.getOptions(data, context, searchQuery);
|
|
806
|
-
return res;
|
|
807
|
-
};
|
|
808
774
|
// Generate a unique query key for this field
|
|
809
775
|
const queryKey = useMemo(() => {
|
|
810
776
|
return ["field-options", field.key, field.name];
|
|
811
777
|
}, [field.key, field.name]);
|
|
812
778
|
// Initial fetch query for static options or first page
|
|
813
779
|
const initialQuery = useQuery({
|
|
814
|
-
queryKey: [...queryKey, "initial", searchQuery],
|
|
780
|
+
queryKey: [...queryKey, "initial", searchQuery, context],
|
|
815
781
|
queryFn: async () => {
|
|
816
782
|
var _a, _b;
|
|
817
783
|
if (!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.getOptions))
|
|
@@ -825,7 +791,7 @@ function useFieldOptions(field) {
|
|
|
825
791
|
type: "OFFSET",
|
|
826
792
|
hasNextPage: false,
|
|
827
793
|
};
|
|
828
|
-
return await field.optionsSource.getOptions(pagination,
|
|
794
|
+
return await field.optionsSource.getOptions(pagination, context, searchQuery);
|
|
829
795
|
},
|
|
830
796
|
enabled: !!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.getOptions),
|
|
831
797
|
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
@@ -837,13 +803,13 @@ function useFieldOptions(field) {
|
|
|
837
803
|
}, 800), []);
|
|
838
804
|
// Infinite query for pagination
|
|
839
805
|
const infiniteQuery = useInfiniteQuery({
|
|
840
|
-
queryKey: [...queryKey, "infinite"],
|
|
806
|
+
queryKey: [...queryKey, "infinite", context],
|
|
841
807
|
queryFn: async ({ pageParam, }) => {
|
|
842
808
|
var _a;
|
|
843
809
|
if (!((_a = field.optionsSource) === null || _a === void 0 ? void 0 : _a.loadMore)) {
|
|
844
810
|
throw new Error("loadMore function not available");
|
|
845
811
|
}
|
|
846
|
-
return await field.optionsSource.loadMore(pageParam,
|
|
812
|
+
return await field.optionsSource.loadMore(pageParam, context);
|
|
847
813
|
},
|
|
848
814
|
initialPageParam: ((_c = (_b = field.optionsSource) === null || _b === void 0 ? void 0 : _b.pagination) !== null && _c !== void 0 ? _c : {
|
|
849
815
|
sourceId: "",
|
|
@@ -934,11 +900,9 @@ function useFieldOptions(field) {
|
|
|
934
900
|
infiniteQuery,
|
|
935
901
|
field.optionsSource,
|
|
936
902
|
field,
|
|
903
|
+
context,
|
|
937
904
|
]);
|
|
938
905
|
return {
|
|
939
|
-
getSourceOptions: getSourceOptions,
|
|
940
|
-
getDestinationOptions: getDestinationOptions,
|
|
941
|
-
selectionConfig: selection,
|
|
942
906
|
options: filteredOptions,
|
|
943
907
|
loading: initialQuery.isLoading || infiniteQuery.isLoading,
|
|
944
908
|
loadingMore: infiniteQuery.isFetchingNextPage,
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n"],"names":["global","require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,GAAE,IAAI,IAAI,GAAG,OAAO,KAAK;AACzB,GAAE,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13]}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n"],"names":["global","require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,GAAE,IAAI,IAAI,GAAG,OAAO,KAAK;AACzB,GAAE,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,IAAI,IAAI,IAAI,UAAU,CAAC;AAClE,CAAA;;AAEA,CAAA,UAAc,GAAG,QAAQ;;;;;;;;;;;;AC7BzB,CAAA,IAAI,UAAU,GAAG,OAAOA,cAAM,IAAI,QAAQ,IAAIA,cAAM,IAAIA,cAAM,CAAC,MAAM,KAAK,MAAM,IAAIA,cAAM;;AAE1F,CAAA,WAAc,GAAG,UAAU;;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GAAG;AACvB,KAAI,IAAI,IAAI,GAAG,GAAG,EAAE;AACpB,SAAQ,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC;;KAEnC,QAAQ,GAAG,SAAS;KACpB,QAAQ,GAAG,IAAI;KACf,YAAY,GAAG,IAAI;;KAEnB,IAAI,UAAU,EAAE;AACpB,OAAM,IAAI,OAAO,KAAK,SAAS,EAAE;AACjC,SAAQ,OAAO,WAAW,CAAC,YAAY,CAAC;AACxC,OAAA;OACM,IAAI,MAAM,EAAE;AAClB;SACQ,YAAY,CAAC,OAAO,CAAC;AAC7B,SAAQ,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC;AAChD,SAAQ,OAAO,UAAU,CAAC,YAAY,CAAC;AACvC,OAAA;AACA,KAAA;AACA,KAAI,IAAI,OAAO,KAAK,SAAS,EAAE;AAC/B,OAAM,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC;AAC9C,KAAA;AACA,KAAI,OAAO,MAAM;AACjB,GAAA;AACA,GAAE,SAAS,CAAC,MAAM,GAAG,MAAM;AAC3B,GAAE,SAAS,CAAC,KAAK,GAAG,KAAK;AACzB,GAAE,OAAO,SAAS;AAClB,CAAA;;AAEA,CAAA,UAAc,GAAG,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-fastn-ai/react-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "React hooks and components for integrating Fastn AI connector marketplace into your applications. Built on top of @fastn-ai/core with React Query for optimal performance.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"homepage": "https://docs.fastn.ai",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@dev-fastn-ai/core": "^2.0.
|
|
63
|
-
"@fastn-ai/core": "^1.0.
|
|
62
|
+
"@dev-fastn-ai/core": "^2.0.7",
|
|
63
|
+
"@fastn-ai/core": "^1.0.4",
|
|
64
64
|
"@types/lodash": "^4.17.20",
|
|
65
65
|
"lodash": "^4.17.21"
|
|
66
66
|
},
|