@atlaskit/link-create 0.8.0 → 0.8.2

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 (105) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/common/utils/locale/fetch-messages-for-locale.js +64 -0
  3. package/dist/cjs/i18n/da.js +22 -0
  4. package/dist/cjs/i18n/de.js +22 -0
  5. package/dist/cjs/i18n/es.js +22 -0
  6. package/dist/cjs/i18n/fi.js +22 -0
  7. package/dist/cjs/i18n/fr.js +22 -0
  8. package/dist/cjs/i18n/hu.js +22 -0
  9. package/dist/cjs/i18n/it.js +22 -0
  10. package/dist/cjs/i18n/ja.js +22 -0
  11. package/dist/cjs/i18n/nb.js +22 -0
  12. package/dist/cjs/i18n/pl.js +22 -0
  13. package/dist/cjs/i18n/pt_BR.js +22 -0
  14. package/dist/cjs/i18n/ru.js +22 -0
  15. package/dist/cjs/i18n/sv.js +22 -0
  16. package/dist/cjs/i18n/th.js +22 -0
  17. package/dist/cjs/i18n/tr.js +22 -0
  18. package/dist/cjs/i18n/uk.js +22 -0
  19. package/dist/cjs/i18n/vi.js +22 -0
  20. package/dist/cjs/i18n/zh_TW.js +22 -0
  21. package/dist/cjs/ui/main.js +7 -1
  22. package/dist/cjs/version.json +1 -1
  23. package/dist/es2019/common/utils/locale/fetch-messages-for-locale.js +21 -0
  24. package/dist/es2019/i18n/da.js +15 -0
  25. package/dist/es2019/i18n/de.js +15 -0
  26. package/dist/es2019/i18n/es.js +15 -0
  27. package/dist/es2019/i18n/fi.js +15 -0
  28. package/dist/es2019/i18n/fr.js +15 -0
  29. package/dist/es2019/i18n/hu.js +15 -0
  30. package/dist/es2019/i18n/it.js +15 -0
  31. package/dist/es2019/i18n/ja.js +15 -0
  32. package/dist/es2019/i18n/nb.js +15 -0
  33. package/dist/es2019/i18n/pl.js +15 -0
  34. package/dist/es2019/i18n/pt_BR.js +15 -0
  35. package/dist/es2019/i18n/ru.js +15 -0
  36. package/dist/es2019/i18n/sv.js +15 -0
  37. package/dist/es2019/i18n/th.js +15 -0
  38. package/dist/es2019/i18n/tr.js +15 -0
  39. package/dist/es2019/i18n/uk.js +15 -0
  40. package/dist/es2019/i18n/vi.js +15 -0
  41. package/dist/es2019/i18n/zh_TW.js +15 -0
  42. package/dist/es2019/ui/main.js +7 -1
  43. package/dist/es2019/version.json +1 -1
  44. package/dist/esm/common/utils/locale/fetch-messages-for-locale.js +41 -0
  45. package/dist/esm/i18n/da.js +15 -0
  46. package/dist/esm/i18n/de.js +15 -0
  47. package/dist/esm/i18n/es.js +15 -0
  48. package/dist/esm/i18n/fi.js +15 -0
  49. package/dist/esm/i18n/fr.js +15 -0
  50. package/dist/esm/i18n/hu.js +15 -0
  51. package/dist/esm/i18n/it.js +15 -0
  52. package/dist/esm/i18n/ja.js +15 -0
  53. package/dist/esm/i18n/nb.js +15 -0
  54. package/dist/esm/i18n/pl.js +15 -0
  55. package/dist/esm/i18n/pt_BR.js +15 -0
  56. package/dist/esm/i18n/ru.js +15 -0
  57. package/dist/esm/i18n/sv.js +15 -0
  58. package/dist/esm/i18n/th.js +15 -0
  59. package/dist/esm/i18n/tr.js +15 -0
  60. package/dist/esm/i18n/uk.js +15 -0
  61. package/dist/esm/i18n/vi.js +15 -0
  62. package/dist/esm/i18n/zh_TW.js +15 -0
  63. package/dist/esm/ui/main.js +7 -1
  64. package/dist/esm/version.json +1 -1
  65. package/dist/types/common/utils/locale/fetch-messages-for-locale.d.ts +2 -0
  66. package/dist/types/i18n/da.d.ts +14 -0
  67. package/dist/types/i18n/de.d.ts +14 -0
  68. package/dist/types/i18n/es.d.ts +14 -0
  69. package/dist/types/i18n/fi.d.ts +14 -0
  70. package/dist/types/i18n/fr.d.ts +14 -0
  71. package/dist/types/i18n/hu.d.ts +14 -0
  72. package/dist/types/i18n/it.d.ts +14 -0
  73. package/dist/types/i18n/ja.d.ts +14 -0
  74. package/dist/types/i18n/nb.d.ts +14 -0
  75. package/dist/types/i18n/pl.d.ts +14 -0
  76. package/dist/types/i18n/pt_BR.d.ts +14 -0
  77. package/dist/types/i18n/ru.d.ts +14 -0
  78. package/dist/types/i18n/sv.d.ts +14 -0
  79. package/dist/types/i18n/th.d.ts +14 -0
  80. package/dist/types/i18n/tr.d.ts +14 -0
  81. package/dist/types/i18n/uk.d.ts +14 -0
  82. package/dist/types/i18n/vi.d.ts +14 -0
  83. package/dist/types/i18n/zh_TW.d.ts +14 -0
  84. package/dist/types-ts4.5/common/utils/locale/fetch-messages-for-locale.d.ts +2 -0
  85. package/dist/types-ts4.5/i18n/da.d.ts +14 -0
  86. package/dist/types-ts4.5/i18n/de.d.ts +14 -0
  87. package/dist/types-ts4.5/i18n/es.d.ts +14 -0
  88. package/dist/types-ts4.5/i18n/fi.d.ts +14 -0
  89. package/dist/types-ts4.5/i18n/fr.d.ts +14 -0
  90. package/dist/types-ts4.5/i18n/hu.d.ts +14 -0
  91. package/dist/types-ts4.5/i18n/it.d.ts +14 -0
  92. package/dist/types-ts4.5/i18n/ja.d.ts +14 -0
  93. package/dist/types-ts4.5/i18n/nb.d.ts +14 -0
  94. package/dist/types-ts4.5/i18n/pl.d.ts +14 -0
  95. package/dist/types-ts4.5/i18n/pt_BR.d.ts +14 -0
  96. package/dist/types-ts4.5/i18n/ru.d.ts +14 -0
  97. package/dist/types-ts4.5/i18n/sv.d.ts +14 -0
  98. package/dist/types-ts4.5/i18n/th.d.ts +14 -0
  99. package/dist/types-ts4.5/i18n/tr.d.ts +14 -0
  100. package/dist/types-ts4.5/i18n/uk.d.ts +14 -0
  101. package/dist/types-ts4.5/i18n/vi.d.ts +14 -0
  102. package/dist/types-ts4.5/i18n/zh_TW.d.ts +14 -0
  103. package/example-helpers/mock-plugin-form.tsx +91 -0
  104. package/package.json +3 -8
  105. package/tmp/api-report-tmp.d.ts +0 -136
@@ -1,136 +0,0 @@
1
- ## API Report File for "@atlaskit/link-create"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import { AsyncSelectProps as AsyncSelectProps_2 } from '@atlaskit/select';
10
- import { jsx } from '@emotion/react';
11
- import { MemoExoticComponent } from 'react';
12
- import { ModalDialogProps } from '@atlaskit/modal-dialog';
13
- import { OptionType } from '@atlaskit/select';
14
- import { default as React_2 } from 'react';
15
- import { ReactNode } from 'react';
16
- import { SpinnerProps } from '@atlaskit/spinner';
17
- import { TextFieldProps as TextFieldProps_2 } from '@atlaskit/textfield';
18
-
19
- // @public
20
- export function AsyncSelect<T = OptionType>({ label, name, validationHelpText, isRequired, testId, validators, defaultValue, ...rest }: AsyncSelectProps<T>): jsx.JSX.Element;
21
-
22
- // @public (undocumented)
23
- type AsyncSelectProps<T = OptionType> = AsyncSelectProps_2<T> & {
24
- name: string;
25
- label: string;
26
- validationHelpText?: string;
27
- testId?: string;
28
- isRequired?: boolean;
29
- validators?: Validator[];
30
- };
31
-
32
- // @public (undocumented)
33
- const ComposedLinkCreate: MemoExoticComponent<(props: LinkCreateWithModalProps) => jsx.JSX.Element>;
34
- export default ComposedLinkCreate;
35
-
36
- // @public (undocumented)
37
- export const CreateForm: <FormData_1 extends Record<string, any> = {}>({ children, testId, onSubmit, onCancel, isLoading, hideFooter, }: CreateFormProps<FormData_1>) => jsx.JSX.Element;
38
-
39
- // @public (undocumented)
40
- export function CreateFormLoader({ size }: Partial<SpinnerProps>): jsx.JSX.Element;
41
-
42
- // @public (undocumented)
43
- export interface CreateFormProps<FormData> {
44
- // (undocumented)
45
- children: ReactNode;
46
- // (undocumented)
47
- hideFooter?: boolean;
48
- // (undocumented)
49
- isLoading?: boolean;
50
- // (undocumented)
51
- onCancel?: () => void;
52
- // (undocumented)
53
- onSubmit: (data: FormData) => void;
54
- // (undocumented)
55
- testId?: string;
56
- }
57
-
58
- // @public
59
- export type CreatePayload = {
60
- url: string;
61
- objectId: string;
62
- objectType: string;
63
- data?: Record<string, unknown>;
64
- };
65
-
66
- // @public (undocumented)
67
- interface Group {
68
- icon: string;
69
- key: string;
70
- label: string;
71
- }
72
-
73
- // @public (undocumented)
74
- export const LinkCreateCallbackProvider: React_2.FC<LinkCreateCallbackProviderProps>;
75
-
76
- // @public (undocumented)
77
- interface LinkCreateCallbackProviderProps {
78
- onCancel?: () => void;
79
- onCreate?: (result: CreatePayload) => Promise<void> | void;
80
- onFailure?: (errorMessage: string) => void;
81
- }
82
-
83
- // @public (undocumented)
84
- export interface LinkCreatePlugin {
85
- form: ReactNode;
86
- group: Group;
87
- icon: string;
88
- key: string;
89
- label: string;
90
- }
91
-
92
- // @public (undocumented)
93
- export interface LinkCreateProps {
94
- entityKey: string;
95
- groupKey?: string;
96
- onCancel?: () => void;
97
- onCreate?: (payload: CreatePayload) => Promise<void> | void;
98
- onFailure?: (error: unknown) => void;
99
- // (undocumented)
100
- plugins: LinkCreatePlugin[];
101
- testId?: string;
102
- triggeredFrom?: string;
103
- }
104
-
105
- // @public (undocumented)
106
- export interface LinkCreateWithModalProps extends LinkCreateProps, Partial<Pick<ModalDialogProps, 'onCloseComplete' | 'onOpenComplete'>> {
107
- active?: boolean;
108
- modalTitle?: string;
109
- }
110
-
111
- // @public
112
- export function TextField({ label, name, validationHelpText, validators, defaultValue, isRequired, ...restProps }: TextFieldProps): jsx.JSX.Element;
113
-
114
- // @public (undocumented)
115
- type TextFieldProps = Omit<TextFieldProps_2, 'name'> & {
116
- name: string;
117
- label?: string;
118
- validationHelpText?: string;
119
- validators?: Validator[];
120
- };
121
-
122
- // @public (undocumented)
123
- export const useLinkCreateCallback: () => LinkCreateCallbackProviderProps;
124
-
125
- // @public (undocumented)
126
- export type Validator = {
127
- isValid: (val: unknown) => boolean;
128
- errorMessage: string;
129
- };
130
-
131
- // @public
132
- export type ValidatorMap = Record<string, Validator[]>;
133
-
134
- // (No @packageDocumentation comment for this package)
135
-
136
- ```