@atlaskit/link-datasource 1.19.22 → 1.19.23

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.
Files changed (24) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/analytics/constants.js +1 -1
  3. package/dist/cjs/hooks/useValidateAqlText.js +83 -45
  4. package/dist/cjs/ui/assets-modal/modal/index.js +20 -34
  5. package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +18 -15
  6. package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +14 -84
  7. package/dist/cjs/ui/assets-modal/search-container/index.js +1 -1
  8. package/dist/es2019/analytics/constants.js +1 -1
  9. package/dist/es2019/hooks/useValidateAqlText.js +70 -31
  10. package/dist/es2019/ui/assets-modal/modal/index.js +5 -4
  11. package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +19 -16
  12. package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +13 -56
  13. package/dist/es2019/ui/assets-modal/search-container/index.js +1 -1
  14. package/dist/esm/analytics/constants.js +1 -1
  15. package/dist/esm/hooks/useValidateAqlText.js +83 -45
  16. package/dist/esm/ui/assets-modal/modal/index.js +20 -34
  17. package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +19 -16
  18. package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +14 -85
  19. package/dist/esm/ui/assets-modal/search-container/index.js +1 -1
  20. package/dist/types/hooks/useValidateAqlText.d.ts +21 -5
  21. package/dist/types/ui/assets-modal/search-container/aql-search-input/index.d.ts +0 -1
  22. package/dist/types-ts4.5/hooks/useValidateAqlText.d.ts +21 -5
  23. package/dist/types-ts4.5/ui/assets-modal/search-container/aql-search-input/index.d.ts +0 -1
  24. package/package.json +4 -4
@@ -1,11 +1,27 @@
1
+ type IdleResult = {
2
+ type: 'idle';
3
+ };
4
+ type LoadingResult = {
5
+ type: 'loading';
6
+ };
7
+ export type ValidResult = {
8
+ type: 'valid';
9
+ validatedAql: string;
10
+ };
11
+ export type InvalidResult = {
12
+ type: 'invalid';
13
+ error: string;
14
+ };
15
+ export type AqlValidationResult = IdleResult | LoadingResult | ValidResult | InvalidResult;
1
16
  export type AqlValidationResponse = {
2
17
  isValid: boolean;
3
18
  message: string | null;
4
19
  };
5
20
  export type UseValidateAqlTextState = {
6
- validateAqlTextLoading: boolean;
7
- validateAqlTextError: Error | undefined;
8
- isValidAqlText: boolean;
9
- validateAqlText: (aql: string) => Promise<AqlValidationResponse>;
21
+ debouncedValidation: (value: string | undefined) => Promise<string | undefined>;
22
+ validateAqlText: (aql: string) => Promise<'error' | undefined>;
23
+ lastValidationResult: AqlValidationResult;
10
24
  };
11
- export declare const useValidateAqlText: (workspaceId: string) => UseValidateAqlTextState;
25
+ export declare const SEARCH_DEBOUNCE = 350;
26
+ export declare const useValidateAqlText: (workspaceId: string, initialValue: string) => UseValidateAqlTextState;
27
+ export {};
@@ -5,5 +5,4 @@ export interface AqlSearchInputProps {
5
5
  testId?: string;
6
6
  isSearching: boolean;
7
7
  }
8
- export declare const SEARCH_DEBOUNCE_MS = 350;
9
8
  export declare const AqlSearchInput: ({ value, workspaceId, testId, isSearching, }: AqlSearchInputProps) => jsx.JSX.Element;
@@ -1,11 +1,27 @@
1
+ type IdleResult = {
2
+ type: 'idle';
3
+ };
4
+ type LoadingResult = {
5
+ type: 'loading';
6
+ };
7
+ export type ValidResult = {
8
+ type: 'valid';
9
+ validatedAql: string;
10
+ };
11
+ export type InvalidResult = {
12
+ type: 'invalid';
13
+ error: string;
14
+ };
15
+ export type AqlValidationResult = IdleResult | LoadingResult | ValidResult | InvalidResult;
1
16
  export type AqlValidationResponse = {
2
17
  isValid: boolean;
3
18
  message: string | null;
4
19
  };
5
20
  export type UseValidateAqlTextState = {
6
- validateAqlTextLoading: boolean;
7
- validateAqlTextError: Error | undefined;
8
- isValidAqlText: boolean;
9
- validateAqlText: (aql: string) => Promise<AqlValidationResponse>;
21
+ debouncedValidation: (value: string | undefined) => Promise<string | undefined>;
22
+ validateAqlText: (aql: string) => Promise<'error' | undefined>;
23
+ lastValidationResult: AqlValidationResult;
10
24
  };
11
- export declare const useValidateAqlText: (workspaceId: string) => UseValidateAqlTextState;
25
+ export declare const SEARCH_DEBOUNCE = 350;
26
+ export declare const useValidateAqlText: (workspaceId: string, initialValue: string) => UseValidateAqlTextState;
27
+ export {};
@@ -5,5 +5,4 @@ export interface AqlSearchInputProps {
5
5
  testId?: string;
6
6
  isSearching: boolean;
7
7
  }
8
- export declare const SEARCH_DEBOUNCE_MS = 350;
9
8
  export declare const AqlSearchInput: ({ value, workspaceId, testId, isSearching, }: AqlSearchInputProps) => jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.19.22",
3
+ "version": "1.19.23",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/analytics-next": "^9.1.3",
35
35
  "@atlaskit/avatar": "^21.4.0",
36
36
  "@atlaskit/badge": "^15.2.0",
37
- "@atlaskit/button": "^16.17.0",
37
+ "@atlaskit/button": "^16.18.0",
38
38
  "@atlaskit/editor-prosemirror": "1.1.0",
39
39
  "@atlaskit/empty-state": "^7.5.0",
40
40
  "@atlaskit/form": "^9.0.0",
@@ -51,13 +51,13 @@
51
51
  "@atlaskit/lozenge": "^11.5.0",
52
52
  "@atlaskit/modal-dialog": "^12.10.0",
53
53
  "@atlaskit/platform-feature-flags": "^0.2.4",
54
- "@atlaskit/pragmatic-drag-and-drop": "^0.24.0",
54
+ "@atlaskit/pragmatic-drag-and-drop": "^0.25.0",
55
55
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.12.0",
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.0",
57
57
  "@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.17.0",
58
58
  "@atlaskit/primitives": "^1.13.0",
59
59
  "@atlaskit/select": "^17.0.0",
60
- "@atlaskit/smart-card": "^26.42.0",
60
+ "@atlaskit/smart-card": "^26.43.0",
61
61
  "@atlaskit/spinner": "^16.0.0",
62
62
  "@atlaskit/tag": "^12.0.0",
63
63
  "@atlaskit/textfield": "6.0.0",