@bigbinary/neeto-molecules 3.16.28 → 3.16.30

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.
@@ -108,7 +108,7 @@
108
108
  "help": "Help",
109
109
  "goBack": "Go back",
110
110
  "productSwitcher": "Product switcher",
111
- "neetoProducts": "neeto products",
111
+ "neetoProducts": "Neeto products",
112
112
  "currentPlan": "Current plan: <strong>{{subscriptionPlan,anyCase}} plan</strong>",
113
113
  "helpLinks": {
114
114
  "liveChat": "Chat with Support",
@@ -133,7 +133,7 @@
133
133
  },
134
134
  "productSwitcher": {
135
135
  "noApps": "No apps found",
136
- "chooseNeetoProduct": "Choose your neeto product",
136
+ "chooseNeetoProduct": "Choose your Neeto product",
137
137
  "searchProducts": "Search products"
138
138
  },
139
139
  "alert": {
@@ -408,10 +408,11 @@
408
408
  "viewPublishedVersion": "View published version",
409
409
  "publishLater": "Publish later",
410
410
  "publishNow": "Publish now",
411
- "publishSettings": "Publish settings",
412
411
  "dateTime": "Date & Time",
413
- "helperText": "This allows you to schedule a publication time.",
414
- "timezoneDescription": "Your current timezone is <strong>{{timezone, anyCase}}</strong>. To change it, click <button>here</button>."
412
+ "timezoneDescription": "Your current timezone is <strong>{{timezone, anyCase}}</strong>. To change it, click <button>here</button>.",
413
+ "tooltip": {
414
+ "publishLater": "Article will be published on {{date, anyCase}}."
415
+ }
415
416
  },
416
417
  "shareViaLink": {
417
418
  "title": "Share your {{productName, anyCase}}",
@@ -585,6 +586,8 @@
585
586
  "element_one": "Element",
586
587
  "element_other": "Elements",
587
588
  "addNewElement": "Add new element",
589
+ "addNewElementDescription": "To add elements, click or drag them onto the preview.",
590
+ "elementsReorderDescription": "You can reorder the elements either from here or directly within the preview.",
588
591
  "addAllElements": "Add all elements",
589
592
  "searchElements": "Search elements",
590
593
  "myElements": "My elements",
@@ -1,31 +1,29 @@
1
1
  import React from 'react';
2
2
  import { AlertProps, ButtonProps } from '@bigbinary/neetoui';
3
3
 
4
- interface PublishPaneProps {
4
+ interface SchedulePaneProps {
5
+ isOpen: boolean;
5
6
  isSubmitting: boolean;
6
7
  onPublish: (params: {
7
- isPublishLaterChecked: boolean;
8
8
  datetimeValue: Date | null;
9
- onClose: () => void;
10
9
  }) => void;
11
- onCancel: (params: {
10
+ onClose: (params: {
12
11
  onClose: () => void;
13
12
  }) => void;
14
13
  datetime: Date | null;
15
14
  }
16
- interface PublishButtonProps extends ButtonProps {
17
- showTooltipWhenDisabled?: boolean;
18
- publishPaneProps?: PublishPaneProps;
19
- }
20
15
  interface PublishBlockProps {
21
16
  renderDraftButtons: (props: {
22
17
  ViewDraftButton: React.FC<ButtonProps>;
23
18
  ResetDraftButton: React.FC<ButtonProps>;
24
19
  }) => React.ReactNode;
25
20
  renderPublishButtons: (props: {
26
- PublishButton: React.FC<PublishButtonProps>;
21
+ PublishButton: React.FC<ButtonProps & {
22
+ showTooltipWhenDisabled?: boolean;
23
+ }>;
27
24
  PublishPreviewButton: React.FC<ButtonProps>;
28
25
  }) => React.ReactNode;
26
+ datetime: Date | null;
29
27
  }
30
28
  /**
31
29
  *
@@ -67,51 +65,6 @@ interface PublishBlockProps {
67
65
  * );
68
66
  * };
69
67
  * @endexample
70
- * To use scheduling of publication:
71
- *
72
- * @example
73
- *
74
- * import PublishBlock from "@bigbinary/neeto-molecules/PublishBlock";
75
- *
76
- * const PublishActionBlock = (
77
- * {
78
- * //all variables used in the below example can be passed as props or can be defined in the component itself
79
- * }
80
- * ) => {
81
- * const renderDraftButtons = ({ ViewDraftButton, ResetDraftButton }) =>
82
- * !isDraftBlockHidden && (
83
- * <>
84
- * <ViewDraftButton to={previewDraftUrl} />
85
- * {hasDraftVersion && <ResetDraftButton onClick={handleResetDraft} />}
86
- * </>
87
- * );
88
- *
89
- * const renderPublishButtons = ({ PublishButton, PublishPreviewButton }) => (
90
- * <>
91
- * <PublishButton
92
- * disabled={isPublishDisabled}
93
- * onClick={handlePublish}
94
- * publishPaneProps={{
95
- * isSubmitting: false,
96
- * onPublish: ({ onClose }) => onClose(),
97
- * onCancel: ({ onClose }) => onClose(),
98
- * datetime: null,
99
- * }}
100
- * />
101
- * <PublishPreviewButton
102
- * disabled={isPublishPreviewDisabled}
103
- * to={previewPublishedUrl}
104
- * />
105
- * </>
106
- * );
107
- * return (
108
- * <PublishBlock
109
- * renderDraftButtons={renderDraftButtons}
110
- * renderPublishButtons={renderPublishButtons}
111
- * />
112
- * );
113
- * };
114
- * @endexample
115
68
  * This optional component can be used to render the reset alert modal for
116
69
  *
117
70
  * discarding draft.
@@ -140,9 +93,37 @@ interface PublishBlockProps {
140
93
  * );
141
94
  * };
142
95
  * @endexample
96
+ * This optional component can be used to render the publish later pane.
97
+ *
98
+ * @example
99
+ *
100
+ * import PublishBlock from "@bigbinary/neeto-molecules/PublishBlock";
101
+ *
102
+ * const PublishLaterPane = (
103
+ * {
104
+ * //all variables used in the below example can be passed as props or can be defined in the component itself
105
+ * }
106
+ * ) => {
107
+ * const [isOpen, setIsOpen] = useState(false);
108
+ *
109
+ * return (
110
+ * <>
111
+ * <PublishBlock.SchedulePane
112
+ * {...{ isOpen }}
113
+ * datetime={new Date()}
114
+ * isSubmitting={false}
115
+ * onClose={() => setIsOpen(false)}
116
+ * onPublish={handlePublish}
117
+ * />
118
+ * <Button label="Open SchedulePane" onClick={() => setIsOpen(true)} />
119
+ * </>
120
+ * );
121
+ * };
122
+ * @endexample
143
123
  */
144
124
  declare const PublishBlock: React.FC<PublishBlockProps> & {
145
125
  Alert: React.FC<AlertProps>;
126
+ SchedulePane: React.FC<SchedulePaneProps>;
146
127
  };
147
128
 
148
129
  export { PublishBlock as default };