sanity 5.1.1-next.8 → 5.2.0-next.12
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/lib/_chunks-es/package.js +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.js +133 -55
- package/lib/index.js.map +1 -1
- package/package.json +13 -13
|
@@ -7,7 +7,7 @@ try {
|
|
|
7
7
|
try {
|
|
8
8
|
buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
|
|
9
9
|
// and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
|
|
10
|
-
"5.
|
|
10
|
+
"5.2.0-next.12+2b27e008d3";
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
const SANITY_VERSION = buildVersion || `${version}-dev`;
|
package/lib/index.d.ts
CHANGED
|
@@ -14377,8 +14377,12 @@ declare const studioLocaleStrings: {
|
|
|
14377
14377
|
'release.layer.hide': string
|
|
14378
14378
|
/** Label for the release menu */
|
|
14379
14379
|
'release.menu.label': string
|
|
14380
|
+
/** Menu item label for scheduled drafts */
|
|
14381
|
+
'release.menu.scheduled-drafts': string
|
|
14380
14382
|
/** Tooltip for the release menu */
|
|
14381
14383
|
'release.menu.tooltip': string
|
|
14384
|
+
/** Menu item label for viewing content releases */
|
|
14385
|
+
'release.menu.view-releases': string
|
|
14382
14386
|
/** Label for draft perspective in navbar */
|
|
14383
14387
|
'release.navbar.drafts': string
|
|
14384
14388
|
/** Label for published releases in navbar */
|
package/lib/index.js
CHANGED
|
@@ -1981,8 +1981,12 @@ const studioLocaleNamespace = "studio", validationLocaleNamespace = "validation"
|
|
|
1981
1981
|
"release.layer.hide": "Hide release",
|
|
1982
1982
|
/** Label for the release menu */
|
|
1983
1983
|
"release.menu.label": "Release menu",
|
|
1984
|
+
/** Menu item label for scheduled drafts */
|
|
1985
|
+
"release.menu.scheduled-drafts": "View Scheduled Drafts",
|
|
1984
1986
|
/** Tooltip for the release menu */
|
|
1985
1987
|
"release.menu.tooltip": "Actions",
|
|
1988
|
+
/** Menu item label for viewing content releases */
|
|
1989
|
+
"release.menu.view-releases": "View Content Releases",
|
|
1986
1990
|
/** Label for draft perspective in navbar */
|
|
1987
1991
|
"release.navbar.drafts": "Drafts",
|
|
1988
1992
|
/** Label for published releases in navbar */
|
|
@@ -7903,6 +7907,7 @@ function getTemplatePermissions({
|
|
|
7903
7907
|
permission: "create",
|
|
7904
7908
|
document: {
|
|
7905
7909
|
_id: documentId,
|
|
7910
|
+
_type: schemaType.name,
|
|
7906
7911
|
...resolvedInitialValue
|
|
7907
7912
|
}
|
|
7908
7913
|
}).pipe(map(({
|
|
@@ -51062,7 +51067,7 @@ function createFieldDefinitionDictionary(fieldDefinitions) {
|
|
|
51062
51067
|
return fieldDefinitions.reduce((acc, val) => (acc[val.id] = val, acc), {});
|
|
51063
51068
|
}
|
|
51064
51069
|
function generateFieldId(field) {
|
|
51065
|
-
return [field.type, field.fieldPath, field.
|
|
51070
|
+
return [field.type, field.fieldPath, field.title].join("-");
|
|
51066
51071
|
}
|
|
51067
51072
|
function getDocumentFieldDefinitions(supportedFieldTypes, documentTypes, objectTypes) {
|
|
51068
51073
|
const supportedFieldTypeSet = new Set(supportedFieldTypes);
|
|
@@ -51163,7 +51168,7 @@ function resolveFilterName(schemaType) {
|
|
|
51163
51168
|
function sortFieldDefinitions(a, b) {
|
|
51164
51169
|
return a.title.localeCompare(b.title) || a.titlePath.slice(0, -1).join("/").localeCompare(b.titlePath.slice(0, -1).join("/")) || a.fieldPath.localeCompare(b.fieldPath);
|
|
51165
51170
|
}
|
|
51166
|
-
const RECENT_SEARCH_VERSION$1 =
|
|
51171
|
+
const RECENT_SEARCH_VERSION$1 = 3, STORED_SEARCHES_NAMESPACE = "studio.search.recent", defaultValue = {
|
|
51167
51172
|
version: RECENT_SEARCH_VERSION$1,
|
|
51168
51173
|
recentSearches: []
|
|
51169
51174
|
};
|
|
@@ -51192,7 +51197,7 @@ function useStoredSearch() {
|
|
|
51192
51197
|
let t5;
|
|
51193
51198
|
return $[13] !== set2 || $[14] !== value ? (t5 = [value, set2], $[13] = set2, $[14] = value, $[15] = t5) : t5 = $[15], t5;
|
|
51194
51199
|
}
|
|
51195
|
-
const MAX_RECENT_SEARCHES = 5, RECENT_SEARCH_VERSION =
|
|
51200
|
+
const MAX_RECENT_SEARCHES = 5, RECENT_SEARCH_VERSION = 3;
|
|
51196
51201
|
function useRecentSearchesStore() {
|
|
51197
51202
|
const $ = c(18), [storedSearch, setStoredSearch] = useStoredSearch(), schema2 = useSchema(), {
|
|
51198
51203
|
search: t0
|
|
@@ -51366,6 +51371,11 @@ function _temp$1S() {
|
|
|
51366
51371
|
padding: "0 0.25rem"
|
|
51367
51372
|
} }, 0);
|
|
51368
51373
|
}
|
|
51374
|
+
const RecentSearchClicked = defineEvent({
|
|
51375
|
+
name: "Recent Search Viewed",
|
|
51376
|
+
version: 1,
|
|
51377
|
+
description: "User clicked on a recent search item to reapply it"
|
|
51378
|
+
});
|
|
51369
51379
|
function DocumentTypesPill(t0) {
|
|
51370
51380
|
const $ = c(6), {
|
|
51371
51381
|
availableCharacters,
|
|
@@ -51417,7 +51427,7 @@ const DEFAULT_COMBINED_TYPE_COUNT = 40, RecentSearchItemButton = styled(Button$1
|
|
|
51417
51427
|
}
|
|
51418
51428
|
`;
|
|
51419
51429
|
function RecentSearchItem(t0) {
|
|
51420
|
-
const $ = c(
|
|
51430
|
+
const $ = c(37);
|
|
51421
51431
|
let index, rest, t1, value;
|
|
51422
51432
|
$[0] !== t0 ? ({
|
|
51423
51433
|
index,
|
|
@@ -51427,52 +51437,52 @@ function RecentSearchItem(t0) {
|
|
|
51427
51437
|
} = t0, $[0] = t0, $[1] = index, $[2] = rest, $[3] = t1, $[4] = value) : (index = $[1], rest = $[2], t1 = $[3], value = $[4]);
|
|
51428
51438
|
const maxVisibleTypePillChars = t1 === void 0 ? DEFAULT_COMBINED_TYPE_COUNT : t1, {
|
|
51429
51439
|
dispatch
|
|
51430
|
-
} = useSearchState(), recentSearchesStore = useRecentSearchesStore(), availableCharacters = maxVisibleTypePillChars - value.query.length;
|
|
51440
|
+
} = useSearchState(), recentSearchesStore = useRecentSearchesStore(), telemetry = useTelemetry(), availableCharacters = maxVisibleTypePillChars - value.query.length;
|
|
51431
51441
|
let t2;
|
|
51432
|
-
$[5] !== dispatch || $[6] !== recentSearchesStore || $[7] !== value ? (t2 = () => {
|
|
51442
|
+
$[5] !== dispatch || $[6] !== recentSearchesStore || $[7] !== telemetry || $[8] !== value ? (t2 = () => {
|
|
51433
51443
|
dispatch({
|
|
51434
51444
|
type: "TERMS_SET",
|
|
51435
51445
|
filters: value?.filters,
|
|
51436
51446
|
terms: value
|
|
51437
|
-
}), recentSearchesStore && recentSearchesStore?.addSearch(value, value?.filters);
|
|
51438
|
-
}, $[5] = dispatch, $[6] = recentSearchesStore, $[7] =
|
|
51447
|
+
}), recentSearchesStore && recentSearchesStore?.addSearch(value, value?.filters), telemetry.log(RecentSearchClicked);
|
|
51448
|
+
}, $[5] = dispatch, $[6] = recentSearchesStore, $[7] = telemetry, $[8] = value, $[9] = t2) : t2 = $[9];
|
|
51439
51449
|
const handleClick = t2;
|
|
51440
51450
|
let t3;
|
|
51441
|
-
$[
|
|
51451
|
+
$[10] !== index || $[11] !== recentSearchesStore ? (t3 = (event) => {
|
|
51442
51452
|
event.stopPropagation(), recentSearchesStore && recentSearchesStore?.removeSearchAtIndex(index);
|
|
51443
|
-
}, $[
|
|
51453
|
+
}, $[10] = index, $[11] = recentSearchesStore, $[12] = t3) : t3 = $[12];
|
|
51444
51454
|
const handleDelete = t3;
|
|
51445
51455
|
let t4;
|
|
51446
|
-
$[
|
|
51456
|
+
$[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsxs(Inline, { paddingY: 2, children: [
|
|
51447
51457
|
/* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: /* @__PURE__ */ jsx(ClockIcon, {}) }),
|
|
51448
51458
|
/* @__PURE__ */ jsx(Text$1, { children: "\u200B" })
|
|
51449
|
-
] }), $[
|
|
51459
|
+
] }), $[13] = t4) : t4 = $[13];
|
|
51450
51460
|
let t5;
|
|
51451
|
-
$[
|
|
51461
|
+
$[14] !== value.query ? (t5 = value.query && /* @__PURE__ */ jsx(SearchItemQueryFlex, { align: "center", paddingY: 2, children: /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, textOverflow: "ellipsis", weight: "medium", children: value.query }) }), $[14] = value.query, $[15] = t5) : t5 = $[15];
|
|
51452
51462
|
let t6;
|
|
51453
|
-
$[
|
|
51463
|
+
$[16] !== availableCharacters || $[17] !== value.types ? (t6 = value.types.length > 0 && /* @__PURE__ */ jsx(SearchItemPillsBox, { children: /* @__PURE__ */ jsx(DocumentTypesPill, { availableCharacters, types: value.types }) }), $[16] = availableCharacters, $[17] = value.types, $[18] = t6) : t6 = $[18];
|
|
51454
51464
|
let t7;
|
|
51455
|
-
$[
|
|
51465
|
+
$[19] !== value.filters ? (t7 = value?.filters?.map(_temp$1R), $[19] = value.filters, $[20] = t7) : t7 = $[20];
|
|
51456
51466
|
let t8;
|
|
51457
|
-
$[
|
|
51467
|
+
$[21] !== t5 || $[22] !== t6 || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Flex, { align: "stretch", flex: 1, gap: 2, justify: "flex-start", marginLeft: 3, wrap: "wrap", children: [
|
|
51458
51468
|
t5,
|
|
51459
51469
|
t6,
|
|
51460
51470
|
t7
|
|
51461
|
-
] }), $[
|
|
51471
|
+
] }), $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8) : t8 = $[24];
|
|
51462
51472
|
let t9;
|
|
51463
|
-
$[
|
|
51473
|
+
$[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(Flex, { padding: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) }), $[25] = t9) : t9 = $[25];
|
|
51464
51474
|
let t10;
|
|
51465
|
-
$[
|
|
51475
|
+
$[26] !== handleDelete ? (t10 = /* @__PURE__ */ jsx(Flex, { align: "center", children: /* @__PURE__ */ jsx(CloseButtonDiv, { onClick: handleDelete, children: t9 }) }), $[26] = handleDelete, $[27] = t10) : t10 = $[27];
|
|
51466
51476
|
let t11;
|
|
51467
|
-
$[
|
|
51477
|
+
$[28] !== t10 || $[29] !== t8 ? (t11 = /* @__PURE__ */ jsxs(Flex, { align: "stretch", children: [
|
|
51468
51478
|
t4,
|
|
51469
51479
|
t8,
|
|
51470
51480
|
t10
|
|
51471
|
-
] }), $[
|
|
51481
|
+
] }), $[28] = t10, $[29] = t8, $[30] = t11) : t11 = $[30];
|
|
51472
51482
|
let t12;
|
|
51473
|
-
$[
|
|
51483
|
+
$[31] !== handleClick || $[32] !== t11 ? (t12 = /* @__PURE__ */ jsx(RecentSearchItemButton, { mode: "bleed", onClick: handleClick, paddingLeft: 3, paddingRight: 1, paddingY: 1, tabIndex: -1, children: t11 }), $[31] = handleClick, $[32] = t11, $[33] = t12) : t12 = $[33];
|
|
51474
51484
|
let t13;
|
|
51475
|
-
return $[
|
|
51485
|
+
return $[34] !== rest || $[35] !== t12 ? (t13 = /* @__PURE__ */ jsx(Box, { ...rest, children: t12 }), $[34] = rest, $[35] = t12, $[36] = t13) : t13 = $[36], t13;
|
|
51476
51486
|
}
|
|
51477
51487
|
function _temp$1R(filter2, i) {
|
|
51478
51488
|
return /* @__PURE__ */ jsx(FilterPill, { filter: filter2 }, i);
|
|
@@ -54132,14 +54142,22 @@ function CalendarPopover(t0) {
|
|
|
54132
54142
|
function _temp$1I(prev) {
|
|
54133
54143
|
return !prev;
|
|
54134
54144
|
}
|
|
54135
|
-
const
|
|
54145
|
+
const NavigatedToReleasesOverview = defineEvent({
|
|
54146
|
+
name: "Navigated to Content Releases",
|
|
54147
|
+
version: 1,
|
|
54148
|
+
description: "User navigated to the content releases list view"
|
|
54149
|
+
}), NavigatedToScheduledDrafts = defineEvent({
|
|
54150
|
+
name: "Navigated to Scheduled Drafts",
|
|
54151
|
+
version: 1,
|
|
54152
|
+
description: "User navigated to the scheduled drafts list view"
|
|
54153
|
+
}), getPickerView = ({
|
|
54136
54154
|
hasSingleDocRelease,
|
|
54137
54155
|
isScheduledDraftsEnabled,
|
|
54138
54156
|
isReleasesEnabled,
|
|
54139
54157
|
cardinalityView,
|
|
54140
54158
|
isDraftModelEnabled
|
|
54141
54159
|
}) => isReleasesEnabled ? hasSingleDocRelease || isScheduledDraftsEnabled && isDraftModelEnabled || cardinalityView === "drafts" ? "both" : "contentReleases" : cardinalityView === "releases" ? "both" : "singleDocReleases", CardinalityViewPicker = (t0) => {
|
|
54142
|
-
const $ = c(
|
|
54160
|
+
const $ = c(46), {
|
|
54143
54161
|
cardinalityView,
|
|
54144
54162
|
loading,
|
|
54145
54163
|
isScheduledDraftsEnabled,
|
|
@@ -54149,7 +54167,7 @@ const getPickerView = ({
|
|
|
54149
54167
|
onCardinalityViewChange
|
|
54150
54168
|
} = t0, {
|
|
54151
54169
|
t
|
|
54152
|
-
} = useTranslation(releasesLocaleNamespace);
|
|
54170
|
+
} = useTranslation(releasesLocaleNamespace), telemetry = useTelemetry();
|
|
54153
54171
|
let t1;
|
|
54154
54172
|
$[0] !== allReleases ? (t1 = allReleases.some(isCardinalityOneRelease), $[0] = allReleases, $[1] = t1) : t1 = $[1];
|
|
54155
54173
|
const hasSingleDocRelease = t1;
|
|
@@ -54162,46 +54180,54 @@ const getPickerView = ({
|
|
|
54162
54180
|
isDraftModelEnabled
|
|
54163
54181
|
}), $[2] = cardinalityView, $[3] = hasSingleDocRelease, $[4] = isDraftModelEnabled, $[5] = isReleasesEnabled, $[6] = isScheduledDraftsEnabled, $[7] = t2) : t2 = $[7];
|
|
54164
54182
|
const pickerView = t2;
|
|
54183
|
+
let t3;
|
|
54184
|
+
$[8] !== onCardinalityViewChange || $[9] !== telemetry ? (t3 = (view) => () => {
|
|
54185
|
+
const telemetryEvent = view === "releases" ? NavigatedToReleasesOverview : NavigatedToScheduledDrafts;
|
|
54186
|
+
telemetry.log(telemetryEvent, {
|
|
54187
|
+
source: "view-picker"
|
|
54188
|
+
}), onCardinalityViewChange(view)();
|
|
54189
|
+
}, $[8] = onCardinalityViewChange, $[9] = telemetry, $[10] = t3) : t3 = $[10];
|
|
54190
|
+
const handleViewChange = t3;
|
|
54165
54191
|
if (pickerView === "contentReleases" || pickerView === "singleDocReleases") {
|
|
54166
|
-
let t32;
|
|
54167
|
-
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t32 = /* @__PURE__ */ jsx(CalendarIcon, {}), $[8] = t32) : t32 = $[8];
|
|
54168
54192
|
let t42;
|
|
54169
|
-
$[
|
|
54193
|
+
$[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t42 = /* @__PURE__ */ jsx(CalendarIcon, {}), $[11] = t42) : t42 = $[11];
|
|
54170
54194
|
let t52;
|
|
54171
|
-
|
|
54172
|
-
|
|
54173
|
-
|
|
54174
|
-
|
|
54195
|
+
$[12] !== pickerView || $[13] !== t ? (t52 = t(pickerView === "contentReleases" ? "action.releases" : "action.drafts"), $[12] = pickerView, $[13] = t, $[14] = t52) : t52 = $[14];
|
|
54196
|
+
let t62;
|
|
54197
|
+
return $[15] !== t52 ? (t62 = /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, children: [
|
|
54198
|
+
t42,
|
|
54199
|
+
/* @__PURE__ */ jsx(Text$1, { size: 1, weight: "semibold", children: t52 })
|
|
54200
|
+
] }), $[15] = t52, $[16] = t62) : t62 = $[16], t62;
|
|
54175
54201
|
}
|
|
54176
|
-
let t3;
|
|
54177
|
-
$[14] !== cardinalityView || $[15] !== t ? (t3 = t(cardinalityView === "releases" ? "action.releases" : "action.drafts"), $[14] = cardinalityView, $[15] = t, $[16] = t3) : t3 = $[16];
|
|
54178
54202
|
let t4;
|
|
54179
|
-
$[17]
|
|
54180
|
-
fontWeight: 600
|
|
54181
|
-
}, $[17] = t4) : t4 = $[17];
|
|
54203
|
+
$[17] !== cardinalityView || $[18] !== t ? (t4 = t(cardinalityView === "releases" ? "action.releases" : "action.drafts"), $[17] = cardinalityView, $[18] = t, $[19] = t4) : t4 = $[19];
|
|
54182
54204
|
let t5;
|
|
54183
|
-
$[
|
|
54205
|
+
$[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t5 = {
|
|
54206
|
+
fontWeight: 600
|
|
54207
|
+
}, $[20] = t5) : t5 = $[20];
|
|
54184
54208
|
let t6;
|
|
54185
|
-
$[21] !==
|
|
54186
|
-
|
|
54187
|
-
|
|
54188
|
-
|
|
54209
|
+
$[21] !== loading || $[22] !== t4 ? (t6 = /* @__PURE__ */ jsx(Button, { mode: "bleed", paddingY: 2, text: t4, icon: CalendarIcon, iconRight: ChevronDownIcon, disabled: loading, style: t5 }), $[21] = loading, $[22] = t4, $[23] = t6) : t6 = $[23];
|
|
54210
|
+
let t7;
|
|
54211
|
+
$[24] !== t ? (t7 = t("action.releases"), $[24] = t, $[25] = t7) : t7 = $[25];
|
|
54212
|
+
const t8 = cardinalityView === "releases";
|
|
54189
54213
|
let t9;
|
|
54190
|
-
$[
|
|
54214
|
+
$[26] !== handleViewChange ? (t9 = handleViewChange("releases"), $[26] = handleViewChange, $[27] = t9) : t9 = $[27];
|
|
54191
54215
|
let t10;
|
|
54192
|
-
$[29] !==
|
|
54193
|
-
|
|
54194
|
-
|
|
54195
|
-
|
|
54216
|
+
$[28] !== t7 || $[29] !== t8 || $[30] !== t9 ? (t10 = /* @__PURE__ */ jsx(MenuItem, { text: t7, selected: t8, onClick: t9 }), $[28] = t7, $[29] = t8, $[30] = t9, $[31] = t10) : t10 = $[31];
|
|
54217
|
+
let t11;
|
|
54218
|
+
$[32] !== t ? (t11 = t("action.drafts"), $[32] = t, $[33] = t11) : t11 = $[33];
|
|
54219
|
+
const t12 = cardinalityView === "drafts";
|
|
54196
54220
|
let t13;
|
|
54197
|
-
$[
|
|
54221
|
+
$[34] !== handleViewChange ? (t13 = handleViewChange("drafts"), $[34] = handleViewChange, $[35] = t13) : t13 = $[35];
|
|
54198
54222
|
let t14;
|
|
54199
|
-
$[37] !==
|
|
54200
|
-
t9,
|
|
54201
|
-
t13
|
|
54202
|
-
] }), $[37] = t13, $[38] = t9, $[39] = t14) : t14 = $[39];
|
|
54223
|
+
$[36] !== t11 || $[37] !== t12 || $[38] !== t13 ? (t14 = /* @__PURE__ */ jsx(MenuItem, { text: t11, selected: t12, onClick: t13 }), $[36] = t11, $[37] = t12, $[38] = t13, $[39] = t14) : t14 = $[39];
|
|
54203
54224
|
let t15;
|
|
54204
|
-
|
|
54225
|
+
$[40] !== t10 || $[41] !== t14 ? (t15 = /* @__PURE__ */ jsxs(Menu, { children: [
|
|
54226
|
+
t10,
|
|
54227
|
+
t14
|
|
54228
|
+
] }), $[40] = t10, $[41] = t14, $[42] = t15) : t15 = $[42];
|
|
54229
|
+
let t16;
|
|
54230
|
+
return $[43] !== t15 || $[44] !== t6 ? (t16 = /* @__PURE__ */ jsx(MenuButton, { id: "cardinality-view-menu", button: t6, menu: t15 }), $[43] = t15, $[44] = t6, $[45] = t16) : t16 = $[45], t16;
|
|
54205
54231
|
};
|
|
54206
54232
|
function useScheduledDraftDocument(releaseDocumentId, t0) {
|
|
54207
54233
|
const $ = c(19);
|
|
@@ -79769,7 +79795,57 @@ function ReleaseTypeMenuSection(t0) {
|
|
|
79769
79795
|
t10
|
|
79770
79796
|
] }), $[26] = t10, $[27] = t8, $[28] = t11) : t11 = $[28], t11;
|
|
79771
79797
|
}
|
|
79772
|
-
const
|
|
79798
|
+
const ScheduledDraftsMenuItem = () => {
|
|
79799
|
+
const $ = c(10), router = useRouter(), {
|
|
79800
|
+
t
|
|
79801
|
+
} = useTranslation(), telemetry = useTelemetry(), isScheduledDraftsEnabled = useScheduledDraftsEnabled(), {
|
|
79802
|
+
enabled: isSingleDocReleaseEnabled
|
|
79803
|
+
} = useFeatureEnabled(FEATURES.singleDocRelease), {
|
|
79804
|
+
document: t0
|
|
79805
|
+
} = useWorkspace(), {
|
|
79806
|
+
drafts: t1
|
|
79807
|
+
} = t0, {
|
|
79808
|
+
enabled: isDraftModelEnabled
|
|
79809
|
+
} = t1;
|
|
79810
|
+
let t2;
|
|
79811
|
+
$[0] !== router ? (t2 = router.resolveIntentLink(RELEASES_SCHEDULED_DRAFTS_INTENT, {
|
|
79812
|
+
view: "drafts"
|
|
79813
|
+
}), $[0] = router, $[1] = t2) : t2 = $[1];
|
|
79814
|
+
const scheduledDraftsUrl = t2;
|
|
79815
|
+
let t3;
|
|
79816
|
+
$[2] !== telemetry ? (t3 = () => {
|
|
79817
|
+
telemetry.log(NavigatedToScheduledDrafts, {
|
|
79818
|
+
source: "menu"
|
|
79819
|
+
});
|
|
79820
|
+
}, $[2] = telemetry, $[3] = t3) : t3 = $[3];
|
|
79821
|
+
const handleClick = t3;
|
|
79822
|
+
if (!isScheduledDraftsEnabled || !isSingleDocReleaseEnabled || !isDraftModelEnabled)
|
|
79823
|
+
return null;
|
|
79824
|
+
let t4;
|
|
79825
|
+
$[4] !== t ? (t4 = t("release.menu.scheduled-drafts"), $[4] = t, $[5] = t4) : t4 = $[5];
|
|
79826
|
+
let t5;
|
|
79827
|
+
return $[6] !== handleClick || $[7] !== scheduledDraftsUrl || $[8] !== t4 ? (t5 = /* @__PURE__ */ jsx(MenuItem, { as: "a", href: scheduledDraftsUrl, onClick: handleClick, icon: CalendarIcon, text: t4, "data-testid": "scheduled-drafts-menu-item" }), $[6] = handleClick, $[7] = scheduledDraftsUrl, $[8] = t4, $[9] = t5) : t5 = $[9], t5;
|
|
79828
|
+
}, ViewContentReleasesMenuItem = () => {
|
|
79829
|
+
const $ = c(10), router = useRouter(), {
|
|
79830
|
+
t
|
|
79831
|
+
} = useTranslation(), telemetry = useTelemetry();
|
|
79832
|
+
let t0;
|
|
79833
|
+
$[0] !== router ? (t0 = router.resolvePathFromState({
|
|
79834
|
+
tool: SCHEDULES_TOOL_NAME
|
|
79835
|
+
}), $[0] = router, $[1] = t0) : t0 = $[1];
|
|
79836
|
+
const releasesUrl = t0;
|
|
79837
|
+
let t1;
|
|
79838
|
+
$[2] !== telemetry ? (t1 = () => {
|
|
79839
|
+
telemetry.log(NavigatedToReleasesOverview, {
|
|
79840
|
+
source: "menu"
|
|
79841
|
+
});
|
|
79842
|
+
}, $[2] = telemetry, $[3] = t1) : t1 = $[3];
|
|
79843
|
+
const handleClick = t1;
|
|
79844
|
+
let t2;
|
|
79845
|
+
$[4] !== t ? (t2 = t("release.menu.view-releases"), $[4] = t, $[5] = t2) : t2 = $[5];
|
|
79846
|
+
let t3;
|
|
79847
|
+
return $[6] !== handleClick || $[7] !== releasesUrl || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(MenuItem, { as: "a", href: releasesUrl, onClick: handleClick, icon: CalendarIcon, text: t2, "data-testid": "view-content-releases-menu-item" }), $[6] = handleClick, $[7] = releasesUrl, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
79848
|
+
}, orderedReleaseTypes = ["asap", "scheduled", "undecided"], StyledBox = styled(Box)`
|
|
79773
79849
|
overflow: auto;
|
|
79774
79850
|
max-height: 75vh;
|
|
79775
79851
|
`, StyledPublishedBox = styled(Box)(({
|
|
@@ -79873,6 +79949,8 @@ function ReleasesList(t0) {
|
|
|
79873
79949
|
let t14;
|
|
79874
79950
|
$[47] !== areReleasesEnabled || $[48] !== handleOpenBundleDialog ? (t14 = areReleasesEnabled && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
79875
79951
|
/* @__PURE__ */ jsx(MenuDivider, {}),
|
|
79952
|
+
/* @__PURE__ */ jsx(ScheduledDraftsMenuItem, {}),
|
|
79953
|
+
/* @__PURE__ */ jsx(ViewContentReleasesMenuItem, {}),
|
|
79876
79954
|
/* @__PURE__ */ jsx(CreateReleaseMenuItem, { onCreateRelease: handleOpenBundleDialog })
|
|
79877
79955
|
] }), $[47] = areReleasesEnabled, $[48] = handleOpenBundleDialog, $[49] = t14) : t14 = $[49];
|
|
79878
79956
|
let t15;
|