@atlaskit/link-create 1.9.4 → 1.10.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/analytics.spec.yaml +24 -2
  3. package/dist/cjs/common/ui/ModalDialog/index.js +49 -0
  4. package/dist/cjs/common/utils/analytics/analytics.codegen.js +1 -1
  5. package/dist/cjs/common/utils/form/index.js +14 -3
  6. package/dist/cjs/controllers/create-field/main.js +23 -26
  7. package/dist/cjs/controllers/form-context/main.js +0 -25
  8. package/dist/cjs/ui/create-form/form-footer/edit-button/index.js +6 -1
  9. package/dist/cjs/ui/create-form/form-footer/edit-button/messages.js +4 -4
  10. package/dist/cjs/ui/create-form/form-footer/main.js +13 -6
  11. package/dist/cjs/ui/create-form/form-footer/submit-button/index.js +5 -0
  12. package/dist/cjs/ui/create-form/main.js +6 -25
  13. package/dist/cjs/ui/link-create/confirm-dismiss-dialog/main.js +5 -9
  14. package/dist/cjs/ui/link-create/edit-modal/index.js +6 -6
  15. package/dist/cjs/ui/link-create/main.js +6 -7
  16. package/dist/cjs/ui/main.js +1 -1
  17. package/dist/es2019/common/ui/ModalDialog/index.js +39 -0
  18. package/dist/es2019/common/utils/analytics/analytics.codegen.js +1 -1
  19. package/dist/es2019/common/utils/form/index.js +13 -2
  20. package/dist/es2019/controllers/create-field/main.js +21 -23
  21. package/dist/es2019/controllers/form-context/main.js +0 -18
  22. package/dist/es2019/ui/create-form/form-footer/edit-button/index.js +8 -2
  23. package/dist/es2019/ui/create-form/form-footer/edit-button/messages.js +4 -4
  24. package/dist/es2019/ui/create-form/form-footer/main.js +13 -2
  25. package/dist/es2019/ui/create-form/form-footer/submit-button/index.js +7 -1
  26. package/dist/es2019/ui/create-form/main.js +3 -20
  27. package/dist/es2019/ui/link-create/confirm-dismiss-dialog/main.js +4 -5
  28. package/dist/es2019/ui/link-create/edit-modal/index.js +6 -3
  29. package/dist/es2019/ui/link-create/main.js +5 -3
  30. package/dist/es2019/ui/main.js +1 -1
  31. package/dist/esm/common/ui/ModalDialog/index.js +39 -0
  32. package/dist/esm/common/utils/analytics/analytics.codegen.js +1 -1
  33. package/dist/esm/common/utils/form/index.js +13 -2
  34. package/dist/esm/controllers/create-field/main.js +21 -24
  35. package/dist/esm/controllers/form-context/main.js +0 -25
  36. package/dist/esm/ui/create-form/form-footer/edit-button/index.js +7 -2
  37. package/dist/esm/ui/create-form/form-footer/edit-button/messages.js +4 -4
  38. package/dist/esm/ui/create-form/form-footer/main.js +12 -2
  39. package/dist/esm/ui/create-form/form-footer/submit-button/index.js +6 -1
  40. package/dist/esm/ui/create-form/main.js +7 -26
  41. package/dist/esm/ui/link-create/confirm-dismiss-dialog/main.js +4 -5
  42. package/dist/esm/ui/link-create/edit-modal/index.js +6 -3
  43. package/dist/esm/ui/link-create/main.js +5 -3
  44. package/dist/esm/ui/main.js +1 -1
  45. package/dist/types/common/types.d.ts +1 -1
  46. package/dist/types/common/ui/Button/index.d.ts +1 -1
  47. package/dist/types/common/ui/ModalDialog/index.d.ts +13 -0
  48. package/dist/types/common/utils/analytics/analytics.codegen.d.ts +7 -1
  49. package/dist/types/common/utils/analytics/components.d.ts +1 -2
  50. package/dist/types/common/utils/form/index.d.ts +1 -1
  51. package/dist/types/controllers/create-field/main.d.ts +1 -0
  52. package/dist/types/controllers/form-context/main.d.ts +1 -3
  53. package/dist/types/ui/create-form/form-footer/edit-button/messages.d.ts +1 -1
  54. package/dist/types/ui/link-create/edit-modal/index.d.ts +1 -1
  55. package/dist/types-ts4.5/common/types.d.ts +1 -1
  56. package/dist/types-ts4.5/common/ui/Button/index.d.ts +1 -1
  57. package/dist/types-ts4.5/common/ui/ModalDialog/index.d.ts +13 -0
  58. package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +7 -1
  59. package/dist/types-ts4.5/common/utils/analytics/components.d.ts +1 -2
  60. package/dist/types-ts4.5/common/utils/form/index.d.ts +1 -1
  61. package/dist/types-ts4.5/controllers/create-field/main.d.ts +1 -0
  62. package/dist/types-ts4.5/controllers/form-context/main.d.ts +1 -3
  63. package/dist/types-ts4.5/ui/create-form/form-footer/edit-button/messages.d.ts +1 -1
  64. package/dist/types-ts4.5/ui/link-create/edit-modal/index.d.ts +1 -1
  65. package/package.json +4 -4
  66. package/report.api.md +1 -1
  67. package/tmp/api-report-tmp.d.ts +1 -1
  68. package/dist/cjs/ui/link-create/track-mount/index.js +0 -30
  69. package/dist/es2019/ui/link-create/track-mount/index.js +0 -24
  70. package/dist/esm/ui/link-create/track-mount/index.js +0 -23
  71. package/dist/types/ui/link-create/track-mount/index.d.ts +0 -5
  72. package/dist/types-ts4.5/ui/link-create/track-mount/index.d.ts +0 -5
@@ -4,4 +4,4 @@ import { FieldMetaState } from 'react-final-form';
4
4
  * to let a Field know if it should hide the error message until
5
5
  * the next submit, or if it returns to the previous error state
6
6
  */
7
- export declare const validateSubmitErrors: (meta: FieldMetaState<any>) => boolean;
7
+ export declare const shouldShowValidationErrors: (meta: FieldMetaState<any>) => boolean;
@@ -1,3 +1,4 @@
1
+ /** @jsx jsx */
1
2
  import { jsx } from '@emotion/react';
2
3
  import { CreateFieldProps } from './types';
3
4
  export declare function CreateField({ id, name, label, isRequired, validators, validationHelpText, testId, children, }: CreateFieldProps): jsx.JSX.Element;
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- import { LinkCreateProps, Validator, ValidatorMap } from '../../common/types';
2
+ import { LinkCreateProps } from '../../common/types';
3
3
  interface FormContextType {
4
- getValidators: () => ValidatorMap;
5
- assignValidator: (name: string, validators: Validator[]) => void;
6
4
  setFormErrorMessage: (errorMessage?: string) => void;
7
5
  formErrorMessage?: string;
8
6
  /**
@@ -1,5 +1,5 @@
1
1
  export declare const messages: {
2
- edit: {
2
+ createAndOpen: {
3
3
  id: string;
4
4
  defaultMessage: string;
5
5
  description: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import Modal from '@atlaskit/modal-dialog';
2
+ import { Modal } from '../../../common/ui/ModalDialog';
3
3
  type EditModalProps = {
4
4
  onClose: () => void;
5
5
  onCloseComplete?: React.ComponentProps<typeof Modal>['onCloseComplete'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-create",
3
- "version": "1.9.4",
3
+ "version": "1.10.0",
4
4
  "description": "The driver component of meta creation flow",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,15 +35,15 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@atlaskit/analytics-next": "^9.1.0",
38
- "@atlaskit/button": "^16.16.0",
38
+ "@atlaskit/button": "^16.17.0",
39
39
  "@atlaskit/empty-state": "^7.6.0",
40
40
  "@atlaskit/form": "^9.0.0",
41
41
  "@atlaskit/icon": "^22.0.0",
42
42
  "@atlaskit/intl-messages-provider": "^1.0.0",
43
- "@atlaskit/linking-common": "^4.18.0",
43
+ "@atlaskit/linking-common": "^4.19.0",
44
44
  "@atlaskit/modal-dialog": "^12.8.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.2.1",
46
- "@atlaskit/primitives": "^1.11.0",
46
+ "@atlaskit/primitives": "^1.12.0",
47
47
  "@atlaskit/select": "^17.0.0",
48
48
  "@atlaskit/spinner": "^16.0.0",
49
49
  "@atlaskit/textfield": "^6.0.0",
package/report.api.md CHANGED
@@ -98,7 +98,7 @@ export interface CreateFormProps<FormData> {
98
98
  // @public
99
99
  export type CreatePayload = {
100
100
  url: string;
101
- ari: string | undefined;
101
+ ari?: string | undefined;
102
102
  objectId: string;
103
103
  objectType: string;
104
104
  data?: Record<string, unknown>;
@@ -61,7 +61,7 @@ export interface CreateFormProps<FormData> {
61
61
  // @public
62
62
  export type CreatePayload = {
63
63
  url: string;
64
- ari: string | undefined;
64
+ ari?: string | undefined;
65
65
  objectId: string;
66
66
  objectType: string;
67
67
  data?: Record<string, unknown>;
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = require("react");
9
- var _analyticsNext = require("@atlaskit/analytics-next");
10
- var _constants = require("../../../common/constants");
11
- var _analytics = _interopRequireDefault(require("../../../common/utils/analytics/analytics.codegen"));
12
- /** @jsx jsx */
13
-
14
- /**
15
- * Analytics tracking for component mount (and unmount)
16
- */
17
- function TrackMount() {
18
- var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
19
- createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
20
- (0, _react.useLayoutEffect)(function () {
21
- // Anything in here is fired on component mount.
22
- createAnalyticsEvent((0, _analytics.default)('screen.linkCreateScreen.viewed', {})).fire(_constants.ANALYTICS_CHANNEL);
23
- return function () {
24
- // Anything in here is fired on component unmount.
25
- createAnalyticsEvent((0, _analytics.default)('ui.modalDialog.closed.linkCreate', {})).fire(_constants.ANALYTICS_CHANNEL);
26
- };
27
- }, [createAnalyticsEvent]);
28
- return null;
29
- }
30
- var _default = exports.default = TrackMount;
@@ -1,24 +0,0 @@
1
- /** @jsx jsx */
2
- import { useLayoutEffect } from 'react';
3
- import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
- import { ANALYTICS_CHANNEL } from '../../../common/constants';
5
- import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
6
-
7
- /**
8
- * Analytics tracking for component mount (and unmount)
9
- */
10
- function TrackMount() {
11
- const {
12
- createAnalyticsEvent
13
- } = useAnalyticsEvents();
14
- useLayoutEffect(() => {
15
- // Anything in here is fired on component mount.
16
- createAnalyticsEvent(createEventPayload('screen.linkCreateScreen.viewed', {})).fire(ANALYTICS_CHANNEL);
17
- return () => {
18
- // Anything in here is fired on component unmount.
19
- createAnalyticsEvent(createEventPayload('ui.modalDialog.closed.linkCreate', {})).fire(ANALYTICS_CHANNEL);
20
- };
21
- }, [createAnalyticsEvent]);
22
- return null;
23
- }
24
- export default TrackMount;
@@ -1,23 +0,0 @@
1
- /** @jsx jsx */
2
- import { useLayoutEffect } from 'react';
3
- import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
- import { ANALYTICS_CHANNEL } from '../../../common/constants';
5
- import createEventPayload from '../../../common/utils/analytics/analytics.codegen';
6
-
7
- /**
8
- * Analytics tracking for component mount (and unmount)
9
- */
10
- function TrackMount() {
11
- var _useAnalyticsEvents = useAnalyticsEvents(),
12
- createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
13
- useLayoutEffect(function () {
14
- // Anything in here is fired on component mount.
15
- createAnalyticsEvent(createEventPayload('screen.linkCreateScreen.viewed', {})).fire(ANALYTICS_CHANNEL);
16
- return function () {
17
- // Anything in here is fired on component unmount.
18
- createAnalyticsEvent(createEventPayload('ui.modalDialog.closed.linkCreate', {})).fire(ANALYTICS_CHANNEL);
19
- };
20
- }, [createAnalyticsEvent]);
21
- return null;
22
- }
23
- export default TrackMount;
@@ -1,5 +0,0 @@
1
- /**
2
- * Analytics tracking for component mount (and unmount)
3
- */
4
- declare function TrackMount(): null;
5
- export default TrackMount;
@@ -1,5 +0,0 @@
1
- /**
2
- * Analytics tracking for component mount (and unmount)
3
- */
4
- declare function TrackMount(): null;
5
- export default TrackMount;