@activecollab/components 2.0.533 → 2.0.535
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/dist/cjs/presentation/myWork/MyWorkListSettingsDialog.js +250 -0
- package/dist/cjs/presentation/myWork/MyWorkListSettingsDialog.js.map +1 -0
- package/dist/cjs/presentation/myWork/MyWorkTasks.js +1789 -0
- package/dist/cjs/presentation/myWork/MyWorkTasks.js.map +1 -0
- package/dist/cjs/presentation/shared/PanelResizer.js +104 -0
- package/dist/cjs/presentation/shared/PanelResizer.js.map +1 -0
- package/dist/cjs/presentation/shared/TaskSheetContent.js +381 -0
- package/dist/cjs/presentation/shared/TaskSheetContent.js.map +1 -0
- package/dist/cjs/presentation/shared/dashboardWidgets.js +26 -7
- package/dist/cjs/presentation/shared/dashboardWidgets.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +45 -1
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/cjs/presentation/shared/portfolioDetails.js +130 -38
- package/dist/cjs/presentation/shared/portfolioDetails.js.map +1 -1
- package/dist/cjs/presentation/shared/tokens.js +13 -1
- package/dist/cjs/presentation/shared/tokens.js.map +1 -1
- package/dist/esm/presentation/myWork/MyWorkListSettingsDialog.d.ts +12 -0
- package/dist/esm/presentation/myWork/MyWorkListSettingsDialog.d.ts.map +1 -0
- package/dist/esm/presentation/myWork/MyWorkListSettingsDialog.js +209 -0
- package/dist/esm/presentation/myWork/MyWorkListSettingsDialog.js.map +1 -0
- package/dist/esm/presentation/myWork/MyWorkTasks.d.ts +89 -0
- package/dist/esm/presentation/myWork/MyWorkTasks.d.ts.map +1 -0
- package/dist/esm/presentation/myWork/MyWorkTasks.js +1639 -0
- package/dist/esm/presentation/myWork/MyWorkTasks.js.map +1 -0
- package/dist/esm/presentation/shared/PanelResizer.d.ts +29 -0
- package/dist/esm/presentation/shared/PanelResizer.d.ts.map +1 -0
- package/dist/esm/presentation/shared/PanelResizer.js +86 -0
- package/dist/esm/presentation/shared/PanelResizer.js.map +1 -0
- package/dist/esm/presentation/shared/TaskSheetContent.d.ts +44 -0
- package/dist/esm/presentation/shared/TaskSheetContent.d.ts.map +1 -0
- package/dist/esm/presentation/shared/TaskSheetContent.js +349 -0
- package/dist/esm/presentation/shared/TaskSheetContent.js.map +1 -0
- package/dist/esm/presentation/shared/dashboardWidgets.d.ts +8 -2
- package/dist/esm/presentation/shared/dashboardWidgets.d.ts.map +1 -1
- package/dist/esm/presentation/shared/dashboardWidgets.js +34 -15
- package/dist/esm/presentation/shared/dashboardWidgets.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +5 -1
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +3 -1
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/esm/presentation/shared/portfolioDetails.d.ts +14 -1
- package/dist/esm/presentation/shared/portfolioDetails.d.ts.map +1 -1
- package/dist/esm/presentation/shared/portfolioDetails.js +115 -37
- package/dist/esm/presentation/shared/portfolioDetails.js.map +1 -1
- package/dist/esm/presentation/shared/tokens.d.ts +11 -0
- package/dist/esm/presentation/shared/tokens.d.ts.map +1 -1
- package/dist/esm/presentation/shared/tokens.js +12 -0
- package/dist/esm/presentation/shared/tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { Input } from "../../components/Input";
|
|
|
9
9
|
import { Label } from "../../components/Label";
|
|
10
10
|
import { RadioGroup } from "../../components/RadioGroup";
|
|
11
11
|
import { Select } from "../../components/Select";
|
|
12
|
+
import { SelectDate } from "../../components/SelectDate";
|
|
12
13
|
import { SelectTrigger } from "../../components/SelectTrigger";
|
|
13
14
|
import { Caption1 } from "../../components/Typography";
|
|
14
15
|
|
|
@@ -28,6 +29,10 @@ import { Caption1 } from "../../components/Typography";
|
|
|
28
29
|
renders the SAME <PortfolioDetailsFields> inside a standalone <Dialog>,
|
|
29
30
|
with a "Save Changes" action.
|
|
30
31
|
|
|
32
|
+
The form body also carries the optional "Ignore Tasks Created Before" date
|
|
33
|
+
(ignore_tasks_created_before). Empty means every task counts. The portfolio
|
|
34
|
+
detail page header and the Portfolio Overview card say when it is set.
|
|
35
|
+
|
|
31
36
|
Both use isPortfolioDetailsValid() and the same always-enabled-submit,
|
|
32
37
|
outline-on-submit validation rule.
|
|
33
38
|
*/
|
|
@@ -49,7 +54,8 @@ export const DEFAULT_PORTFOLIO_FORM_VALUES = {
|
|
|
49
54
|
context: undefined,
|
|
50
55
|
projectIds: [],
|
|
51
56
|
groupBy: "favorites",
|
|
52
|
-
visibility: "everyone"
|
|
57
|
+
visibility: "everyone",
|
|
58
|
+
ignoreTasksCreatedBefore: null
|
|
53
59
|
};
|
|
54
60
|
|
|
55
61
|
/* ------------------------------------------------------------------ */
|
|
@@ -262,6 +268,63 @@ export const defaultPortfolioName = (type, context) => {
|
|
|
262
268
|
portfolio needs its context chosen. Same rule for create and edit. */
|
|
263
269
|
export const isPortfolioDetailsValid = values => values.name.trim().length > 0 && (values.type === "custom" ? values.projectIds.length > 0 : Boolean(values.context));
|
|
264
270
|
|
|
271
|
+
/* ------------------------------------------------------------------ */
|
|
272
|
+
/* Ignore tasks created before — the optional task cutoff */
|
|
273
|
+
/* ------------------------------------------------------------------ */
|
|
274
|
+
|
|
275
|
+
const CUTOFF_MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
276
|
+
|
|
277
|
+
/** "2024-01-01" → "Jan 1, 2024". */
|
|
278
|
+
export const formatCutoffDate = isoDate => {
|
|
279
|
+
const _isoDate$split$map = isoDate.split("-").map(Number),
|
|
280
|
+
year = _isoDate$split$map[0],
|
|
281
|
+
month = _isoDate$split$map[1],
|
|
282
|
+
day = _isoDate$split$map[2];
|
|
283
|
+
return CUTOFF_MONTHS[month - 1] + " " + day + ", " + year;
|
|
284
|
+
};
|
|
285
|
+
const isoToUtcUnix = isoDate => {
|
|
286
|
+
const _isoDate$split$map2 = isoDate.split("-").map(Number),
|
|
287
|
+
year = _isoDate$split$map2[0],
|
|
288
|
+
month = _isoDate$split$map2[1],
|
|
289
|
+
day = _isoDate$split$map2[2];
|
|
290
|
+
return Date.UTC(year, month - 1, day) / 1000;
|
|
291
|
+
};
|
|
292
|
+
const unixToIso = seconds => new Date(seconds * 1000).toISOString().slice(0, 10);
|
|
293
|
+
export const IGNORE_TASKS_FIELD_LABEL = "Ignore Tasks Created Before";
|
|
294
|
+
export const IGNORE_TASKS_FIELD_EXPLAINER = "Exclude older tasks from counts and reports. Budget and spent still include them.";
|
|
295
|
+
|
|
296
|
+
/** One line for the places that show an active cutoff. */
|
|
297
|
+
export const ignoredTasksNote = isoDate => "Tasks created before " + formatCutoffDate(isoDate) + " are not counted.";
|
|
298
|
+
|
|
299
|
+
/** Budget and spent ignore the cutoff; this line says so. */
|
|
300
|
+
export const moneyIgnoresCutoffNote = isoDate => "Includes time and expenses on tasks created before " + formatCutoffDate(isoDate) + ".";
|
|
301
|
+
const IgnoreTasksPicker = _ref2 => {
|
|
302
|
+
let value = _ref2.value,
|
|
303
|
+
onChange = _ref2.onChange;
|
|
304
|
+
const selectedDays = useMemo(() => {
|
|
305
|
+
if (!value) return undefined;
|
|
306
|
+
const day = isoToUtcUnix(value);
|
|
307
|
+
return {
|
|
308
|
+
from: day,
|
|
309
|
+
to: day
|
|
310
|
+
};
|
|
311
|
+
}, [value]);
|
|
312
|
+
return /*#__PURE__*/React.createElement(SelectDate, {
|
|
313
|
+
selectionMode: "daily",
|
|
314
|
+
changeMode: "instant",
|
|
315
|
+
enableYearPicker: true,
|
|
316
|
+
selectedDays: selectedDays,
|
|
317
|
+
onSave: dates => onChange(dates != null && dates.from ? unixToIso(Number(dates.from)) : null),
|
|
318
|
+
trigger: label => /*#__PURE__*/React.createElement(SelectTrigger, {
|
|
319
|
+
id: "pf-ignore-tasks",
|
|
320
|
+
className: "pf-date-trigger",
|
|
321
|
+
typographyProps: {
|
|
322
|
+
color: value ? "primary" : "quaternary"
|
|
323
|
+
}
|
|
324
|
+
}, label)
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
|
|
265
328
|
/* Edit-only notes under the projects picker (custom portfolios). */
|
|
266
329
|
export const PORTFOLIO_PROJECTS_LOCKED_NOTE = "Some of this portfolio's projects aren't shared with you, so its project list is locked here. Add or remove projects from the Projects tab.";
|
|
267
330
|
const completedProjectsNote = count => count === 1 ? "1 project here has been completed and isn't listed. Remove it from the portfolio's Projects tab." : count + " projects here have been completed and aren't listed. Remove them from the portfolio's Projects tab.";
|
|
@@ -272,9 +335,9 @@ const completedProjectsNote = count => count === 1 ? "1 project here has been co
|
|
|
272
335
|
|
|
273
336
|
/* Group-by control: the SortGeneralIcon button the Invite-to-Projects picker
|
|
274
337
|
shows as the search bar's right-side adornment. Controls grouping, not sort. */
|
|
275
|
-
const ProjectsGroupBy =
|
|
276
|
-
let selected =
|
|
277
|
-
onChange =
|
|
338
|
+
const ProjectsGroupBy = _ref3 => {
|
|
339
|
+
let selected = _ref3.selected,
|
|
340
|
+
onChange = _ref3.onChange;
|
|
278
341
|
return /*#__PURE__*/React.createElement(Select, {
|
|
279
342
|
keepSameOptionsOrder: true,
|
|
280
343
|
disableSearch: true,
|
|
@@ -290,15 +353,15 @@ const ProjectsGroupBy = _ref2 => {
|
|
|
290
353
|
}, /*#__PURE__*/React.createElement(SortGeneralIcon, null))
|
|
291
354
|
});
|
|
292
355
|
};
|
|
293
|
-
export const ProjectsPicker =
|
|
294
|
-
let selected =
|
|
295
|
-
onChange =
|
|
296
|
-
groupBy =
|
|
297
|
-
onGroupBy =
|
|
298
|
-
invalid =
|
|
299
|
-
disabled =
|
|
300
|
-
|
|
301
|
-
triggerId =
|
|
356
|
+
export const ProjectsPicker = _ref4 => {
|
|
357
|
+
let selected = _ref4.selected,
|
|
358
|
+
onChange = _ref4.onChange,
|
|
359
|
+
groupBy = _ref4.groupBy,
|
|
360
|
+
onGroupBy = _ref4.onGroupBy,
|
|
361
|
+
invalid = _ref4.invalid,
|
|
362
|
+
disabled = _ref4.disabled,
|
|
363
|
+
_ref4$triggerId = _ref4.triggerId,
|
|
364
|
+
triggerId = _ref4$triggerId === void 0 ? "pf-projects" : _ref4$triggerId;
|
|
302
365
|
const options = useMemo(() => groupPickerProjects(groupBy), [groupBy]);
|
|
303
366
|
const count = selected.length;
|
|
304
367
|
const triggerText = count === 0 ? "Choose projects" : count === 1 ? "1 project selected" : count + " projects selected";
|
|
@@ -323,11 +386,11 @@ export const ProjectsPicker = _ref3 => {
|
|
|
323
386
|
}, triggerText)
|
|
324
387
|
});
|
|
325
388
|
};
|
|
326
|
-
const ContextPicker =
|
|
327
|
-
let type =
|
|
328
|
-
value =
|
|
329
|
-
onChange =
|
|
330
|
-
invalid =
|
|
389
|
+
const ContextPicker = _ref5 => {
|
|
390
|
+
let type = _ref5.type,
|
|
391
|
+
value = _ref5.value,
|
|
392
|
+
onChange = _ref5.onChange,
|
|
393
|
+
invalid = _ref5.invalid;
|
|
331
394
|
const options = type === "category" ? CATEGORIES.map(name => ({
|
|
332
395
|
id: name,
|
|
333
396
|
name
|
|
@@ -362,25 +425,27 @@ const ContextPicker = _ref4 => {
|
|
|
362
425
|
const StyledDetailsForm = styled.div.withConfig({
|
|
363
426
|
displayName: "portfolioDetails__StyledDetailsForm",
|
|
364
427
|
componentId: "sc-yxi1uj-0"
|
|
365
|
-
})(["display:flex;flex-direction:column;gap:24px;.field{display:flex;flex-direction:column;gap:8px;}.field .c-input-wrapper{width:100%;}.field .pf-trigger{width:100%;}"]);
|
|
428
|
+
})(["display:flex;flex-direction:column;gap:24px;.field{display:flex;flex-direction:column;gap:8px;}.field .c-input-wrapper{width:100%;}.field .pf-trigger{width:100%;}.field .pf-date-trigger{width:160px;}"]);
|
|
366
429
|
/** Name + the type's picker + visibility. No Dialog wrappers and no action
|
|
367
430
|
button — the consumer (create step or edit dialog) supplies those. */
|
|
368
|
-
export const PortfolioDetailsFields =
|
|
369
|
-
let values =
|
|
370
|
-
onName =
|
|
371
|
-
onContext =
|
|
372
|
-
onProjects =
|
|
373
|
-
onGroupBy =
|
|
374
|
-
onVisibility =
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
431
|
+
export const PortfolioDetailsFields = _ref6 => {
|
|
432
|
+
let values = _ref6.values,
|
|
433
|
+
onName = _ref6.onName,
|
|
434
|
+
onContext = _ref6.onContext,
|
|
435
|
+
onProjects = _ref6.onProjects,
|
|
436
|
+
onGroupBy = _ref6.onGroupBy,
|
|
437
|
+
onVisibility = _ref6.onVisibility,
|
|
438
|
+
onIgnoreTasksCreatedBefore = _ref6.onIgnoreTasksCreatedBefore,
|
|
439
|
+
showErrors = _ref6.showErrors,
|
|
440
|
+
projectsLocked = _ref6.projectsLocked,
|
|
441
|
+
completedProjectsCount = _ref6.completedProjectsCount;
|
|
378
442
|
const type = values.type,
|
|
379
443
|
name = values.name,
|
|
380
444
|
context = values.context,
|
|
381
445
|
projectIds = values.projectIds,
|
|
382
446
|
groupBy = values.groupBy,
|
|
383
|
-
visibility = values.visibility
|
|
447
|
+
visibility = values.visibility,
|
|
448
|
+
ignoreTasksCreatedBefore = values.ignoreTasksCreatedBefore;
|
|
384
449
|
const nameInvalid = showErrors && name.trim().length === 0;
|
|
385
450
|
const pickerInvalid = showErrors && (type === "custom" ? projectIds.length === 0 : !context);
|
|
386
451
|
return /*#__PURE__*/React.createElement(StyledDetailsForm, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -417,6 +482,16 @@ export const PortfolioDetailsFields = _ref5 => {
|
|
|
417
482
|
invalid: pickerInvalid
|
|
418
483
|
})), /*#__PURE__*/React.createElement("div", {
|
|
419
484
|
className: "field"
|
|
485
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
486
|
+
htmlFor: "pf-ignore-tasks"
|
|
487
|
+
}, IGNORE_TASKS_FIELD_LABEL), /*#__PURE__*/React.createElement(IgnoreTasksPicker, {
|
|
488
|
+
value: ignoreTasksCreatedBefore,
|
|
489
|
+
onChange: onIgnoreTasksCreatedBefore
|
|
490
|
+
}), /*#__PURE__*/React.createElement(Caption1, {
|
|
491
|
+
color: "tertiary",
|
|
492
|
+
className: "pf-note"
|
|
493
|
+
}, IGNORE_TASKS_FIELD_EXPLAINER)), /*#__PURE__*/React.createElement("div", {
|
|
494
|
+
className: "field"
|
|
420
495
|
}, /*#__PURE__*/React.createElement(RadioGroup, {
|
|
421
496
|
label: "Visibility",
|
|
422
497
|
variant: "plain",
|
|
@@ -440,13 +515,13 @@ PortfolioDetailsFields.displayName = "PortfolioDetailsFields";
|
|
|
440
515
|
portfolio's kind (edit changes the details, not the kind), so there is no
|
|
441
516
|
type radio here — only the name, the type's picker, and visibility.
|
|
442
517
|
*/
|
|
443
|
-
export const EditPortfolioDialog =
|
|
444
|
-
let open =
|
|
445
|
-
initialValues =
|
|
446
|
-
onClose =
|
|
447
|
-
onSave =
|
|
448
|
-
projectsLocked =
|
|
449
|
-
completedProjectsCount =
|
|
518
|
+
export const EditPortfolioDialog = _ref7 => {
|
|
519
|
+
let open = _ref7.open,
|
|
520
|
+
initialValues = _ref7.initialValues,
|
|
521
|
+
onClose = _ref7.onClose,
|
|
522
|
+
onSave = _ref7.onSave,
|
|
523
|
+
projectsLocked = _ref7.projectsLocked,
|
|
524
|
+
completedProjectsCount = _ref7.completedProjectsCount;
|
|
450
525
|
const _useState = useState(initialValues),
|
|
451
526
|
values = _useState[0],
|
|
452
527
|
setValues = _useState[1];
|
|
@@ -493,6 +568,9 @@ export const EditPortfolioDialog = _ref6 => {
|
|
|
493
568
|
onVisibility: visibility => patch({
|
|
494
569
|
visibility
|
|
495
570
|
}),
|
|
571
|
+
onIgnoreTasksCreatedBefore: ignoreTasksCreatedBefore => patch({
|
|
572
|
+
ignoreTasksCreatedBefore
|
|
573
|
+
}),
|
|
496
574
|
showErrors: showErrors,
|
|
497
575
|
projectsLocked: projectsLocked,
|
|
498
576
|
completedProjectsCount: completedProjectsCount
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portfolioDetails.js","names":["React","useEffect","useMemo","useState","styled","Button","Dialog","IconButton","SortGeneralIcon","Input","Label","RadioGroup","Select","SelectTrigger","Caption1","DEFAULT_PORTFOLIO_FORM_VALUES","type","name","context","undefined","projectIds","groupBy","visibility","LEADERS_LIST","short","CATEGORIES","CLIENTS","PICKER_PROJECTS","id","client","category","label","leader","favorite","GROUP_BY_OPTIONS","projectOptionId","project","sampleProjectOptionIds","count","slice","Math","max","map","toProjectOptions","projects","sort","a","b","localeCompare","groupPickerProjects","filter","other","groups","length","push","options","field","without","buckets","Map","forEach","_buckets$get","key","has","set","get","Array","from","entries","_ref","PORTFOLIO_TYPES","title","description","VISIBILITY_OPTIONS","contextFieldLabel","leaderShortName","_LEADERS_LIST$find$sh","_LEADERS_LIST$find","find","defaultPortfolioName","isPortfolioDetailsValid","values","trim","Boolean","PORTFOLIO_PROJECTS_LOCKED_NOTE","completedProjectsNote","ProjectsGroupBy","_ref2","selected","onChange","createElement","keepSameOptionsOrder","disableSearch","disabledInternalSort","forceCloseMenu","position","value","target","variant","ProjectsPicker","_ref3","onGroupBy","invalid","disabled","_ref3$triggerId","triggerId","triggerText","noResultText","endAdornment","className","typographyProps","color","ContextPicker","_ref4","placeholder","next","String","StyledDetailsForm","div","withConfig","displayName","componentId","PortfolioDetailsFields","_ref5","onName","onContext","onProjects","onVisibility","showErrors","projectsLocked","completedProjectsCount","nameInvalid","pickerInvalid","htmlFor","event","Fragment","option","EditPortfolioDialog","_ref6","open","initialValues","onClose","onSave","_useState","setValues","_useState2","setShowErrors","patch","current","_extends","handleSave","disableCloseOnEsc","Title","ContentDivider","Content","Actions","style","marginRight","onClick"],"sources":["../../../../src/presentation/shared/portfolioDetails.tsx"],"sourcesContent":["import React, { ReactElement, useEffect, useMemo, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Button } from \"../../components/Button\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { SortGeneralIcon } from \"../../components/Icons\";\nimport { Input } from \"../../components/Input\";\nimport { Label } from \"../../components/Label\";\nimport { RadioGroup } from \"../../components/RadioGroup\";\nimport { Select } from \"../../components/Select\";\nimport { SelectTrigger } from \"../../components/SelectTrigger\";\nimport { Caption1 } from \"../../components/Typography\";\n\n/*\n Portfolio details form — the shared \"step 2\" of the Create Portfolio wizard,\n reused verbatim as the Edit Portfolio dialog.\n\n This mirrors a pattern used across the app: the fields that make up the final\n step of a creation wizard are the same fields shown, later, when the object is\n edited. So the form body (name, the type's picker, visibility) and its\n validation live here once, and two consumers render it:\n\n - The Create Portfolio wizard (PortfoliosList.stories.tsx) renders\n <PortfolioDetailsFields> inside its step-2 <Dialog.Content>, with a\n \"Create Portfolio\" action.\n - <EditPortfolioDialog> (opened from PortfolioOptionsMenu's Edit item)\n renders the SAME <PortfolioDetailsFields> inside a standalone <Dialog>,\n with a \"Save Changes\" action.\n\n Both use isPortfolioDetailsValid() and the same always-enabled-submit,\n outline-on-submit validation rule.\n*/\n\n/* ------------------------------------------------------------------ */\n/* Domain types */\n/* ------------------------------------------------------------------ */\n\n/** How a portfolio decides its members (two kinds, three context types). */\nexport type PortfolioKind = \"custom\" | \"category\" | \"client\" | \"leader\";\n\nexport type PortfolioVisibility = \"everyone\" | \"me\";\n\n/** Grouping of the projects multi-select — matches Invite-to-Projects. */\nexport type GroupBy =\n | \"favorites\"\n | \"labels\"\n | \"companies\"\n | \"categories\"\n | \"leaders\";\n\n/** The editable shape shared by create step 2 and the edit dialog. */\nexport interface PortfolioFormValues {\n type: PortfolioKind;\n name: string;\n /** For context portfolios: the chosen category / client / leader. */\n context?: string;\n /** For custom portfolios: the hand-picked project option ids. */\n projectIds: string[];\n groupBy: GroupBy;\n visibility: PortfolioVisibility;\n}\n\n/** A blank custom portfolio — the fallback seed for the edit dialog. */\nexport const DEFAULT_PORTFOLIO_FORM_VALUES: PortfolioFormValues = {\n type: \"custom\",\n name: \"\",\n context: undefined,\n projectIds: [],\n groupBy: \"favorites\",\n visibility: \"everyone\",\n};\n\n/* ------------------------------------------------------------------ */\n/* Pickers' mock data */\n/* ------------------------------------------------------------------ */\n\nexport interface PickerLeader {\n name: string;\n /** Short \"Firstname L.\" form used in the default portfolio name. */\n short: string;\n}\n\nexport const LEADERS_LIST: PickerLeader[] = [\n { name: \"Theo Brandt\", short: \"Theo B.\" },\n { name: \"Isabel Cortez\", short: \"Isabel C.\" },\n { name: \"Grace Bauer\", short: \"Grace B.\" },\n { name: \"Noah Mercer\", short: \"Noah M.\" },\n];\n\nexport const CATEGORIES = [\n \"Brand & Identity\",\n \"Web & Product\",\n \"Marketing\",\n \"Internal Ops\",\n];\n\nexport const CLIENTS = [\n \"Aperture Studio\",\n \"Orbit Telecom\",\n \"Northwind Traders\",\n \"Meridian Health\",\n];\n\nexport interface PickerProject {\n id: number;\n name: string;\n client: string;\n category: string;\n label: string;\n leader: string;\n favorite: boolean;\n}\n\nexport const PICKER_PROJECTS: PickerProject[] = [\n {\n id: 1,\n name: \"Website Redesign\",\n client: \"Aperture Studio\",\n category: \"Web & Product\",\n label: \"Design\",\n leader: \"Theo Brandt\",\n favorite: true,\n },\n {\n id: 2,\n name: \"Brand Refresh\",\n client: \"Aperture Studio\",\n category: \"Brand & Identity\",\n label: \"Design\",\n leader: \"Isabel Cortez\",\n favorite: true,\n },\n {\n id: 3,\n name: \"Mobile App\",\n client: \"Orbit Telecom\",\n category: \"Web & Product\",\n label: \"Build\",\n leader: \"Grace Bauer\",\n favorite: false,\n },\n {\n id: 4,\n name: \"Q3 Campaign\",\n client: \"Orbit Telecom\",\n category: \"Marketing\",\n label: \"Campaign\",\n leader: \"Noah Mercer\",\n favorite: true,\n },\n {\n id: 5,\n name: \"Internal Wiki\",\n client: \"\",\n category: \"Internal Ops\",\n label: \"\",\n leader: \"Theo Brandt\",\n favorite: false,\n },\n {\n id: 6,\n name: \"Packaging System\",\n client: \"Northwind Traders\",\n category: \"Brand & Identity\",\n label: \"Design\",\n leader: \"Isabel Cortez\",\n favorite: false,\n },\n {\n id: 7,\n name: \"Support Portal\",\n client: \"Meridian Health\",\n category: \"Web & Product\",\n label: \"Build\",\n leader: \"Grace Bauer\",\n favorite: false,\n },\n {\n id: 8,\n name: \"Annual Report\",\n client: \"Northwind Traders\",\n category: \"Marketing\",\n label: \"Campaign\",\n leader: \"Noah Mercer\",\n favorite: true,\n },\n];\n\n/* Group-by options and default match the Invite-to-Projects picker exactly. */\nconst GROUP_BY_OPTIONS: { id: GroupBy; name: string }[] = [\n { id: \"favorites\", name: \"Favorites\" },\n { id: \"labels\", name: \"Label\" },\n { id: \"companies\", name: \"Client\" },\n { id: \"categories\", name: \"Category\" },\n { id: \"leaders\", name: \"Project Leader\" },\n];\n\ninterface ProjectOption {\n id: string;\n name: string;\n}\ninterface ProjectOptionGroup {\n id: string;\n name: string;\n options: ProjectOption[];\n}\n\nconst projectOptionId = (project: PickerProject): string => `p${project.id}`;\n\n/** A small deterministic set of project option ids — seeds a custom\n portfolio's edit dialog so the picker reads as an existing selection. */\nexport const sampleProjectOptionIds = (count: number): string[] =>\n PICKER_PROJECTS.slice(0, Math.max(0, count)).map(projectOptionId);\n\nconst toProjectOptions = (projects: PickerProject[]): ProjectOption[] =>\n projects\n .map((project) => ({ id: projectOptionId(project), name: project.name }))\n .sort((a, b) => a.name.localeCompare(b.name));\n\n/* Build the grouped option tree the Select expects. Alphabetical rows and\n groups; the \"Without ...\" / \"Other\" bucket sits last; the Favorites grouping\n collapses to a flat list when it is the only group (as the app's does). */\nconst groupPickerProjects = (\n groupBy: GroupBy\n): ProjectOption[] | ProjectOptionGroup[] => {\n if (groupBy === \"favorites\") {\n const favorite = PICKER_PROJECTS.filter((project) => project.favorite);\n const other = PICKER_PROJECTS.filter((project) => !project.favorite);\n const groups: ProjectOptionGroup[] = [];\n if (favorite.length) {\n groups.push({\n id: \"g-fav\",\n name: \"Favorite\",\n options: toProjectOptions(favorite),\n });\n }\n if (other.length) {\n groups.push({\n id: \"g-other\",\n name: \"Other\",\n options: toProjectOptions(other),\n });\n }\n return groups.length === 1 ? groups[0].options : groups;\n }\n\n const field: keyof PickerProject =\n groupBy === \"labels\"\n ? \"label\"\n : groupBy === \"companies\"\n ? \"client\"\n : groupBy === \"categories\"\n ? \"category\"\n : \"leader\";\n const without =\n groupBy === \"labels\"\n ? \"Without Label\"\n : groupBy === \"companies\"\n ? \"Without Client\"\n : groupBy === \"categories\"\n ? \"Without Category\"\n : \"Without Leader\";\n\n const buckets = new Map<string, PickerProject[]>();\n PICKER_PROJECTS.forEach((project) => {\n const key = (project[field] as string) || without;\n if (!buckets.has(key)) {\n buckets.set(key, []);\n }\n buckets.get(key)?.push(project);\n });\n\n return Array.from(buckets.entries())\n .map(([name, projects]) => ({\n id: `g-${name}`,\n name,\n options: toProjectOptions(projects),\n }))\n .sort((a, b) =>\n a.name === without\n ? 1\n : b.name === without\n ? -1\n : a.name.localeCompare(b.name)\n );\n};\n\n/* ------------------------------------------------------------------ */\n/* Type + visibility option copy */\n/* ------------------------------------------------------------------ */\n\nexport const PORTFOLIO_TYPES: {\n id: PortfolioKind;\n title: string;\n description: string;\n}[] = [\n {\n id: \"custom\",\n title: \"Custom Portfolio\",\n description: \"The projects you pick by hand. Nothing joins automatically.\",\n },\n {\n id: \"client\",\n title: \"Client Portfolio\",\n description:\n \"All projects for a client company. New ones join automatically.\",\n },\n {\n id: \"leader\",\n title: \"Project Leader Portfolio\",\n description: \"All projects led by a person. New ones join automatically.\",\n },\n {\n id: \"category\",\n title: \"Category Portfolio\",\n description:\n \"All projects in a project category. New ones join automatically.\",\n },\n];\n\nexport const VISIBILITY_OPTIONS: {\n id: PortfolioVisibility;\n title: string;\n description: string;\n}[] = [\n {\n id: \"everyone\",\n title: \"Visible to Everyone\",\n description:\n \"Anyone who can use portfolios sees this one. They still only see the projects they already have access to.\",\n },\n {\n id: \"me\",\n title: \"Visible Only to Me\",\n description: \"Nobody else sees this portfolio.\",\n },\n];\n\nexport const contextFieldLabel = (type: PortfolioKind): string =>\n type === \"custom\"\n ? \"Projects\"\n : type === \"category\"\n ? \"Category\"\n : type === \"client\"\n ? \"Client\"\n : \"Project Leader\";\n\nexport const leaderShortName = (name: string): string =>\n LEADERS_LIST.find((leader) => leader.name === name)?.short ?? name;\n\n/* Default names: \"{Category} Projects\", \"{Client} Projects\", \"Lead by {N.}\". */\nexport const defaultPortfolioName = (\n type: PortfolioKind,\n context: string\n): string => {\n if (!context) return \"\";\n if (type === \"category\" || type === \"client\") return `${context} Projects`;\n if (type === \"leader\") return `Lead by ${leaderShortName(context)}`;\n return \"\";\n};\n\n/* ------------------------------------------------------------------ */\n/* Validation (shared by create step 2 and the edit dialog) */\n/* ------------------------------------------------------------------ */\n\n/** Name is required; a custom portfolio needs at least one project, a context\n portfolio needs its context chosen. Same rule for create and edit. */\nexport const isPortfolioDetailsValid = (values: PortfolioFormValues): boolean =>\n values.name.trim().length > 0 &&\n (values.type === \"custom\"\n ? values.projectIds.length > 0\n : Boolean(values.context));\n\n/* Edit-only notes under the projects picker (custom portfolios). */\nexport const PORTFOLIO_PROJECTS_LOCKED_NOTE =\n \"Some of this portfolio's projects aren't shared with you, so its project list is locked here. Add or remove projects from the Projects tab.\";\n\nconst completedProjectsNote = (count: number): string =>\n count === 1\n ? \"1 project here has been completed and isn't listed. Remove it from the portfolio's Projects tab.\"\n : `${count} projects here have been completed and aren't listed. Remove them from the portfolio's Projects tab.`;\n\n/* ------------------------------------------------------------------ */\n/* Pickers */\n/* ------------------------------------------------------------------ */\n\n/* Group-by control: the SortGeneralIcon button the Invite-to-Projects picker\n shows as the search bar's right-side adornment. Controls grouping, not sort. */\nconst ProjectsGroupBy = ({\n selected,\n onChange,\n}: {\n selected: GroupBy;\n onChange: (groupBy: GroupBy) => void;\n}): ReactElement => (\n <Select\n keepSameOptionsOrder\n disableSearch\n disabledInternalSort\n forceCloseMenu\n position=\"bottom-end\"\n selected={selected}\n onChange={(value) => onChange(value as GroupBy)}\n options={GROUP_BY_OPTIONS}\n target={\n <IconButton type=\"button\" variant=\"text gray\">\n <SortGeneralIcon />\n </IconButton>\n }\n />\n);\n\nexport interface ProjectsPickerProps {\n selected: string[];\n onChange: (ids: string[]) => void;\n groupBy: GroupBy;\n onGroupBy: (groupBy: GroupBy) => void;\n invalid?: boolean;\n disabled?: boolean;\n /** Overrides the trigger element id (default \"pf-projects\") so the picker\n can be reused on a page that also renders the create/edit form. */\n triggerId?: string;\n}\n\nexport const ProjectsPicker = ({\n selected,\n onChange,\n groupBy,\n onGroupBy,\n invalid,\n disabled,\n triggerId = \"pf-projects\",\n}: ProjectsPickerProps): ReactElement => {\n const options = useMemo(() => groupPickerProjects(groupBy), [groupBy]);\n const count = selected.length;\n const triggerText =\n count === 0\n ? \"Choose projects\"\n : count === 1\n ? \"1 project selected\"\n : `${count} projects selected`;\n return (\n <Select\n type=\"multiple\"\n options={options}\n selected={selected}\n onChange={(value) => onChange(value as string[])}\n noResultText=\"No results\"\n endAdornment={\n disabled ? undefined : (\n <ProjectsGroupBy selected={groupBy} onChange={onGroupBy} />\n )\n }\n target={\n <SelectTrigger\n id={triggerId}\n className=\"pf-trigger\"\n invalid={invalid}\n disabled={disabled}\n typographyProps={{ color: count > 0 ? \"primary\" : \"quaternary\" }}\n >\n {triggerText}\n </SelectTrigger>\n }\n />\n );\n};\n\nconst ContextPicker = ({\n type,\n value,\n onChange,\n invalid,\n}: {\n type: PortfolioKind;\n value?: string;\n onChange: (value: string) => void;\n invalid?: boolean;\n}): ReactElement => {\n const options =\n type === \"category\"\n ? CATEGORIES.map((name) => ({ id: name, name }))\n : type === \"client\"\n ? CLIENTS.map((name) => ({ id: name, name }))\n : LEADERS_LIST.map((leader) => ({ id: leader.name, name: leader.name }));\n const placeholder =\n type === \"category\"\n ? \"Choose a category\"\n : type === \"client\"\n ? \"Choose a client\"\n : \"Choose a project leader\";\n return (\n <Select\n forceCloseMenu\n options={options}\n selected={value ?? \"\"}\n onChange={(next) => onChange(String(next))}\n target={\n <SelectTrigger\n id=\"pf-context\"\n className=\"pf-trigger\"\n invalid={invalid}\n typographyProps={{ color: value ? \"primary\" : \"quaternary\" }}\n >\n {value ?? placeholder}\n </SelectTrigger>\n }\n />\n );\n};\n\n/* ------------------------------------------------------------------ */\n/* The reusable form body */\n/* ------------------------------------------------------------------ */\n\nconst StyledDetailsForm = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n /* DS form controls are fixed-width (Input 360px, SelectTrigger 300px); let\n them fill the dialog column instead. */\n .field .c-input-wrapper {\n width: 100%;\n }\n\n .field .pf-trigger {\n width: 100%;\n }\n`;\n\nexport interface PortfolioDetailsFieldsProps {\n values: PortfolioFormValues;\n onName: (value: string) => void;\n onContext: (value: string) => void;\n onProjects: (ids: string[]) => void;\n onGroupBy: (groupBy: GroupBy) => void;\n onVisibility: (value: PortfolioVisibility) => void;\n /* Form pattern (propagating through the app): the submit button is ALWAYS\n enabled. On submit the consumer flips showErrors; each field then outlines\n itself (aria-invalid) while it is invalid, and clears once it becomes\n valid. No field disables submit. */\n showErrors: boolean;\n /** Edit only: the portfolio holds projects this viewer can't access, so the\n projects picker is locked and a note explains why. */\n projectsLocked?: boolean;\n /** Edit only: how many of the portfolio's projects are completed and so are\n not shown by the picker (which lists active projects only). */\n completedProjectsCount?: number;\n}\n\n/** Name + the type's picker + visibility. No Dialog wrappers and no action\n button — the consumer (create step or edit dialog) supplies those. */\nexport const PortfolioDetailsFields = ({\n values,\n onName,\n onContext,\n onProjects,\n onGroupBy,\n onVisibility,\n showErrors,\n projectsLocked,\n completedProjectsCount,\n}: PortfolioDetailsFieldsProps): ReactElement => {\n const { type, name, context, projectIds, groupBy, visibility } = values;\n const nameInvalid = showErrors && name.trim().length === 0;\n const pickerInvalid =\n showErrors && (type === \"custom\" ? projectIds.length === 0 : !context);\n\n return (\n <StyledDetailsForm>\n <div className=\"field\">\n <Label htmlFor=\"pf-name\">Name</Label>\n <Input\n id=\"pf-name\"\n value={name}\n placeholder=\"Portfolio name\"\n invalid={nameInvalid}\n onChange={(event) => onName(event.target.value)}\n />\n </div>\n <div className=\"field\">\n <Label htmlFor={type === \"custom\" ? \"pf-projects\" : \"pf-context\"}>\n {contextFieldLabel(type)}\n </Label>\n {type === \"custom\" ? (\n <>\n <ProjectsPicker\n selected={projectIds}\n onChange={onProjects}\n groupBy={groupBy}\n onGroupBy={onGroupBy}\n invalid={pickerInvalid}\n disabled={projectsLocked}\n />\n {projectsLocked ? (\n <Caption1 color=\"tertiary\" className=\"pf-note\">\n {PORTFOLIO_PROJECTS_LOCKED_NOTE}\n </Caption1>\n ) : completedProjectsCount ? (\n <Caption1 color=\"tertiary\" className=\"pf-note\">\n {completedProjectsNote(completedProjectsCount)}\n </Caption1>\n ) : null}\n </>\n ) : (\n <ContextPicker\n type={type}\n value={context}\n onChange={onContext}\n invalid={pickerInvalid}\n />\n )}\n </div>\n <div className=\"field\">\n <RadioGroup\n label=\"Visibility\"\n variant=\"plain\"\n value={visibility}\n onChange={(value) => onVisibility(value as PortfolioVisibility)}\n options={VISIBILITY_OPTIONS.map((option) => ({\n id: option.id,\n name: option.title,\n description: option.description,\n }))}\n />\n </div>\n </StyledDetailsForm>\n );\n};\n\nPortfolioDetailsFields.displayName = \"PortfolioDetailsFields\";\n\n/* ------------------------------------------------------------------ */\n/* Edit Portfolio dialog — the create wizard's step 2, on its own */\n/* ------------------------------------------------------------------ */\n\nexport interface EditPortfolioDialogProps {\n open: boolean;\n /** The portfolio's current values; the dialog seeds itself from these on\n open, so Cancel discards edits and Save commits them. */\n initialValues: PortfolioFormValues;\n onClose: () => void;\n onSave?: (values: PortfolioFormValues) => void;\n /** Edit only: lock the projects picker (the portfolio has projects this\n viewer can't access). */\n projectsLocked?: boolean;\n /** Edit only: number of completed projects the picker does not show. */\n completedProjectsCount?: number;\n}\n\n/*\n Same fields, same validation as create step 2. The type is fixed to the\n portfolio's kind (edit changes the details, not the kind), so there is no\n type radio here — only the name, the type's picker, and visibility.\n*/\nexport const EditPortfolioDialog = ({\n open,\n initialValues,\n onClose,\n onSave,\n projectsLocked,\n completedProjectsCount,\n}: EditPortfolioDialogProps): ReactElement => {\n const [values, setValues] = useState<PortfolioFormValues>(initialValues);\n const [showErrors, setShowErrors] = useState(false);\n\n /* Re-seed from the portfolio each time the dialog opens. */\n useEffect(() => {\n if (open) {\n setValues(initialValues);\n setShowErrors(false);\n }\n // Seed on open only — initialValues is read at that moment by design.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const patch = (next: Partial<PortfolioFormValues>): void =>\n setValues((current) => ({ ...current, ...next }));\n\n const handleSave = (): void => {\n if (!isPortfolioDetailsValid(values)) {\n setShowErrors(true);\n return;\n }\n onSave?.(values);\n onClose();\n };\n\n return (\n <Dialog open={open} onClose={onClose} disableCloseOnEsc>\n <Dialog.Title>Edit Portfolio</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <PortfolioDetailsFields\n values={values}\n onName={(name) => patch({ name })}\n onContext={(context) => patch({ context })}\n onProjects={(projectIds) => patch({ projectIds })}\n onGroupBy={(groupBy) => patch({ groupBy })}\n onVisibility={(visibility) => patch({ visibility })}\n showErrors={showErrors}\n projectsLocked={projectsLocked}\n completedProjectsCount={completedProjectsCount}\n />\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: \"12px\" }}\n onClick={handleSave}\n >\n Save Changes\n </Button>\n <Button variant=\"secondary\" data-action=\"cancel\" onClick={onClose}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n\nEditPortfolioDialog.displayName = \"EditPortfolioDialog\";\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEzE,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,MAAM,QAAQ,yBA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AAW;IAAC,eAAY,QAAQ;IAAC4D,OAAO,EAAEjB;EAAQ,GAAC,QAE3D,CACM,CACV,CAAC;AAEb,CAAC;AAEDJ,mBAAmB,CAACjB,WAAW,GAAG,qBAAqB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"portfolioDetails.js","names":["React","useEffect","useMemo","useState","styled","Button","Dialog","IconButton","SortGeneralIcon","Input","Label","RadioGroup","Select","SelectDate","SelectTrigger","Caption1","DEFAULT_PORTFOLIO_FORM_VALUES","type","name","context","undefined","projectIds","groupBy","visibility","ignoreTasksCreatedBefore","LEADERS_LIST","short","CATEGORIES","CLIENTS","PICKER_PROJECTS","id","client","category","label","leader","favorite","GROUP_BY_OPTIONS","projectOptionId","project","sampleProjectOptionIds","count","slice","Math","max","map","toProjectOptions","projects","sort","a","b","localeCompare","groupPickerProjects","filter","other","groups","length","push","options","field","without","buckets","Map","forEach","_buckets$get","key","has","set","get","Array","from","entries","_ref","PORTFOLIO_TYPES","title","description","VISIBILITY_OPTIONS","contextFieldLabel","leaderShortName","_LEADERS_LIST$find$sh","_LEADERS_LIST$find","find","defaultPortfolioName","isPortfolioDetailsValid","values","trim","Boolean","CUTOFF_MONTHS","formatCutoffDate","isoDate","_isoDate$split$map","split","Number","year","month","day","isoToUtcUnix","_isoDate$split$map2","Date","UTC","unixToIso","seconds","toISOString","IGNORE_TASKS_FIELD_LABEL","IGNORE_TASKS_FIELD_EXPLAINER","ignoredTasksNote","moneyIgnoresCutoffNote","IgnoreTasksPicker","_ref2","value","onChange","selectedDays","to","createElement","selectionMode","changeMode","enableYearPicker","onSave","dates","trigger","className","typographyProps","color","PORTFOLIO_PROJECTS_LOCKED_NOTE","completedProjectsNote","ProjectsGroupBy","_ref3","selected","keepSameOptionsOrder","disableSearch","disabledInternalSort","forceCloseMenu","position","target","variant","ProjectsPicker","_ref4","onGroupBy","invalid","disabled","_ref4$triggerId","triggerId","triggerText","noResultText","endAdornment","ContextPicker","_ref5","placeholder","next","String","StyledDetailsForm","div","withConfig","displayName","componentId","PortfolioDetailsFields","_ref6","onName","onContext","onProjects","onVisibility","onIgnoreTasksCreatedBefore","showErrors","projectsLocked","completedProjectsCount","nameInvalid","pickerInvalid","htmlFor","event","Fragment","option","EditPortfolioDialog","_ref7","open","initialValues","onClose","_useState","setValues","_useState2","setShowErrors","patch","current","_extends","handleSave","disableCloseOnEsc","Title","ContentDivider","Content","Actions","style","marginRight","onClick"],"sources":["../../../../src/presentation/shared/portfolioDetails.tsx"],"sourcesContent":["import React, { ReactElement, useEffect, useMemo, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Button } from \"../../components/Button\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { IconButton } from \"../../components/IconButton\";\nimport { SortGeneralIcon } from \"../../components/Icons\";\nimport { Input } from \"../../components/Input\";\nimport { Label } from \"../../components/Label\";\nimport { RadioGroup } from \"../../components/RadioGroup\";\nimport { Select } from \"../../components/Select\";\nimport { SelectDate } from \"../../components/SelectDate\";\nimport { SelectTrigger } from \"../../components/SelectTrigger\";\nimport { Caption1 } from \"../../components/Typography\";\n\n/*\n Portfolio details form — the shared \"step 2\" of the Create Portfolio wizard,\n reused verbatim as the Edit Portfolio dialog.\n\n This mirrors a pattern used across the app: the fields that make up the final\n step of a creation wizard are the same fields shown, later, when the object is\n edited. So the form body (name, the type's picker, visibility) and its\n validation live here once, and two consumers render it:\n\n - The Create Portfolio wizard (PortfoliosList.stories.tsx) renders\n <PortfolioDetailsFields> inside its step-2 <Dialog.Content>, with a\n \"Create Portfolio\" action.\n - <EditPortfolioDialog> (opened from PortfolioOptionsMenu's Edit item)\n renders the SAME <PortfolioDetailsFields> inside a standalone <Dialog>,\n with a \"Save Changes\" action.\n\n The form body also carries the optional \"Ignore Tasks Created Before\" date\n (ignore_tasks_created_before). Empty means every task counts. The portfolio\n detail page header and the Portfolio Overview card say when it is set.\n\n Both use isPortfolioDetailsValid() and the same always-enabled-submit,\n outline-on-submit validation rule.\n*/\n\n/* ------------------------------------------------------------------ */\n/* Domain types */\n/* ------------------------------------------------------------------ */\n\n/** How a portfolio decides its members (two kinds, three context types). */\nexport type PortfolioKind = \"custom\" | \"category\" | \"client\" | \"leader\";\n\nexport type PortfolioVisibility = \"everyone\" | \"me\";\n\n/** Grouping of the projects multi-select — matches Invite-to-Projects. */\nexport type GroupBy =\n | \"favorites\"\n | \"labels\"\n | \"companies\"\n | \"categories\"\n | \"leaders\";\n\n/** The editable shape shared by create step 2 and the edit dialog. */\nexport interface PortfolioFormValues {\n type: PortfolioKind;\n name: string;\n /** For context portfolios: the chosen category / client / leader. */\n context?: string;\n /** For custom portfolios: the hand-picked project option ids. */\n projectIds: string[];\n groupBy: GroupBy;\n visibility: PortfolioVisibility;\n /** ignore_tasks_created_before: optional cutoff as \"YYYY-MM-DD\". Tasks\n created before this day do not count in the portfolio's task numbers\n and charts. Money numbers (budget, spent) never use it. */\n ignoreTasksCreatedBefore: string | null;\n}\n\n/** A blank custom portfolio — the fallback seed for the edit dialog. */\nexport const DEFAULT_PORTFOLIO_FORM_VALUES: PortfolioFormValues = {\n type: \"custom\",\n name: \"\",\n context: undefined,\n projectIds: [],\n groupBy: \"favorites\",\n visibility: \"everyone\",\n ignoreTasksCreatedBefore: null,\n};\n\n/* ------------------------------------------------------------------ */\n/* Pickers' mock data */\n/* ------------------------------------------------------------------ */\n\nexport interface PickerLeader {\n name: string;\n /** Short \"Firstname L.\" form used in the default portfolio name. */\n short: string;\n}\n\nexport const LEADERS_LIST: PickerLeader[] = [\n { name: \"Theo Brandt\", short: \"Theo B.\" },\n { name: \"Isabel Cortez\", short: \"Isabel C.\" },\n { name: \"Grace Bauer\", short: \"Grace B.\" },\n { name: \"Noah Mercer\", short: \"Noah M.\" },\n];\n\nexport const CATEGORIES = [\n \"Brand & Identity\",\n \"Web & Product\",\n \"Marketing\",\n \"Internal Ops\",\n];\n\nexport const CLIENTS = [\n \"Aperture Studio\",\n \"Orbit Telecom\",\n \"Northwind Traders\",\n \"Meridian Health\",\n];\n\nexport interface PickerProject {\n id: number;\n name: string;\n client: string;\n category: string;\n label: string;\n leader: string;\n favorite: boolean;\n}\n\nexport const PICKER_PROJECTS: PickerProject[] = [\n {\n id: 1,\n name: \"Website Redesign\",\n client: \"Aperture Studio\",\n category: \"Web & Product\",\n label: \"Design\",\n leader: \"Theo Brandt\",\n favorite: true,\n },\n {\n id: 2,\n name: \"Brand Refresh\",\n client: \"Aperture Studio\",\n category: \"Brand & Identity\",\n label: \"Design\",\n leader: \"Isabel Cortez\",\n favorite: true,\n },\n {\n id: 3,\n name: \"Mobile App\",\n client: \"Orbit Telecom\",\n category: \"Web & Product\",\n label: \"Build\",\n leader: \"Grace Bauer\",\n favorite: false,\n },\n {\n id: 4,\n name: \"Q3 Campaign\",\n client: \"Orbit Telecom\",\n category: \"Marketing\",\n label: \"Campaign\",\n leader: \"Noah Mercer\",\n favorite: true,\n },\n {\n id: 5,\n name: \"Internal Wiki\",\n client: \"\",\n category: \"Internal Ops\",\n label: \"\",\n leader: \"Theo Brandt\",\n favorite: false,\n },\n {\n id: 6,\n name: \"Packaging System\",\n client: \"Northwind Traders\",\n category: \"Brand & Identity\",\n label: \"Design\",\n leader: \"Isabel Cortez\",\n favorite: false,\n },\n {\n id: 7,\n name: \"Support Portal\",\n client: \"Meridian Health\",\n category: \"Web & Product\",\n label: \"Build\",\n leader: \"Grace Bauer\",\n favorite: false,\n },\n {\n id: 8,\n name: \"Annual Report\",\n client: \"Northwind Traders\",\n category: \"Marketing\",\n label: \"Campaign\",\n leader: \"Noah Mercer\",\n favorite: true,\n },\n];\n\n/* Group-by options and default match the Invite-to-Projects picker exactly. */\nconst GROUP_BY_OPTIONS: { id: GroupBy; name: string }[] = [\n { id: \"favorites\", name: \"Favorites\" },\n { id: \"labels\", name: \"Label\" },\n { id: \"companies\", name: \"Client\" },\n { id: \"categories\", name: \"Category\" },\n { id: \"leaders\", name: \"Project Leader\" },\n];\n\ninterface ProjectOption {\n id: string;\n name: string;\n}\ninterface ProjectOptionGroup {\n id: string;\n name: string;\n options: ProjectOption[];\n}\n\nconst projectOptionId = (project: PickerProject): string => `p${project.id}`;\n\n/** A small deterministic set of project option ids — seeds a custom\n portfolio's edit dialog so the picker reads as an existing selection. */\nexport const sampleProjectOptionIds = (count: number): string[] =>\n PICKER_PROJECTS.slice(0, Math.max(0, count)).map(projectOptionId);\n\nconst toProjectOptions = (projects: PickerProject[]): ProjectOption[] =>\n projects\n .map((project) => ({ id: projectOptionId(project), name: project.name }))\n .sort((a, b) => a.name.localeCompare(b.name));\n\n/* Build the grouped option tree the Select expects. Alphabetical rows and\n groups; the \"Without ...\" / \"Other\" bucket sits last; the Favorites grouping\n collapses to a flat list when it is the only group (as the app's does). */\nconst groupPickerProjects = (\n groupBy: GroupBy\n): ProjectOption[] | ProjectOptionGroup[] => {\n if (groupBy === \"favorites\") {\n const favorite = PICKER_PROJECTS.filter((project) => project.favorite);\n const other = PICKER_PROJECTS.filter((project) => !project.favorite);\n const groups: ProjectOptionGroup[] = [];\n if (favorite.length) {\n groups.push({\n id: \"g-fav\",\n name: \"Favorite\",\n options: toProjectOptions(favorite),\n });\n }\n if (other.length) {\n groups.push({\n id: \"g-other\",\n name: \"Other\",\n options: toProjectOptions(other),\n });\n }\n return groups.length === 1 ? groups[0].options : groups;\n }\n\n const field: keyof PickerProject =\n groupBy === \"labels\"\n ? \"label\"\n : groupBy === \"companies\"\n ? \"client\"\n : groupBy === \"categories\"\n ? \"category\"\n : \"leader\";\n const without =\n groupBy === \"labels\"\n ? \"Without Label\"\n : groupBy === \"companies\"\n ? \"Without Client\"\n : groupBy === \"categories\"\n ? \"Without Category\"\n : \"Without Leader\";\n\n const buckets = new Map<string, PickerProject[]>();\n PICKER_PROJECTS.forEach((project) => {\n const key = (project[field] as string) || without;\n if (!buckets.has(key)) {\n buckets.set(key, []);\n }\n buckets.get(key)?.push(project);\n });\n\n return Array.from(buckets.entries())\n .map(([name, projects]) => ({\n id: `g-${name}`,\n name,\n options: toProjectOptions(projects),\n }))\n .sort((a, b) =>\n a.name === without\n ? 1\n : b.name === without\n ? -1\n : a.name.localeCompare(b.name)\n );\n};\n\n/* ------------------------------------------------------------------ */\n/* Type + visibility option copy */\n/* ------------------------------------------------------------------ */\n\nexport const PORTFOLIO_TYPES: {\n id: PortfolioKind;\n title: string;\n description: string;\n}[] = [\n {\n id: \"custom\",\n title: \"Custom Portfolio\",\n description: \"The projects you pick by hand. Nothing joins automatically.\",\n },\n {\n id: \"client\",\n title: \"Client Portfolio\",\n description:\n \"All projects for a client company. New ones join automatically.\",\n },\n {\n id: \"leader\",\n title: \"Project Leader Portfolio\",\n description: \"All projects led by a person. New ones join automatically.\",\n },\n {\n id: \"category\",\n title: \"Category Portfolio\",\n description:\n \"All projects in a project category. New ones join automatically.\",\n },\n];\n\nexport const VISIBILITY_OPTIONS: {\n id: PortfolioVisibility;\n title: string;\n description: string;\n}[] = [\n {\n id: \"everyone\",\n title: \"Visible to Everyone\",\n description:\n \"Anyone who can use portfolios sees this one. They still only see the projects they already have access to.\",\n },\n {\n id: \"me\",\n title: \"Visible Only to Me\",\n description: \"Nobody else sees this portfolio.\",\n },\n];\n\nexport const contextFieldLabel = (type: PortfolioKind): string =>\n type === \"custom\"\n ? \"Projects\"\n : type === \"category\"\n ? \"Category\"\n : type === \"client\"\n ? \"Client\"\n : \"Project Leader\";\n\nexport const leaderShortName = (name: string): string =>\n LEADERS_LIST.find((leader) => leader.name === name)?.short ?? name;\n\n/* Default names: \"{Category} Projects\", \"{Client} Projects\", \"Lead by {N.}\". */\nexport const defaultPortfolioName = (\n type: PortfolioKind,\n context: string\n): string => {\n if (!context) return \"\";\n if (type === \"category\" || type === \"client\") return `${context} Projects`;\n if (type === \"leader\") return `Lead by ${leaderShortName(context)}`;\n return \"\";\n};\n\n/* ------------------------------------------------------------------ */\n/* Validation (shared by create step 2 and the edit dialog) */\n/* ------------------------------------------------------------------ */\n\n/** Name is required; a custom portfolio needs at least one project, a context\n portfolio needs its context chosen. Same rule for create and edit. */\nexport const isPortfolioDetailsValid = (values: PortfolioFormValues): boolean =>\n values.name.trim().length > 0 &&\n (values.type === \"custom\"\n ? values.projectIds.length > 0\n : Boolean(values.context));\n\n/* ------------------------------------------------------------------ */\n/* Ignore tasks created before — the optional task cutoff */\n/* ------------------------------------------------------------------ */\n\nconst CUTOFF_MONTHS = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\n/** \"2024-01-01\" → \"Jan 1, 2024\". */\nexport const formatCutoffDate = (isoDate: string): string => {\n const [year, month, day] = isoDate.split(\"-\").map(Number);\n return `${CUTOFF_MONTHS[month - 1]} ${day}, ${year}`;\n};\n\nconst isoToUtcUnix = (isoDate: string): number => {\n const [year, month, day] = isoDate.split(\"-\").map(Number);\n return Date.UTC(year, month - 1, day) / 1000;\n};\n\nconst unixToIso = (seconds: number): string =>\n new Date(seconds * 1000).toISOString().slice(0, 10);\n\nexport const IGNORE_TASKS_FIELD_LABEL = \"Ignore Tasks Created Before\";\n\nexport const IGNORE_TASKS_FIELD_EXPLAINER =\n \"Exclude older tasks from counts and reports. Budget and spent still include them.\";\n\n/** One line for the places that show an active cutoff. */\nexport const ignoredTasksNote = (isoDate: string): string =>\n `Tasks created before ${formatCutoffDate(isoDate)} are not counted.`;\n\n/** Budget and spent ignore the cutoff; this line says so. */\nexport const moneyIgnoresCutoffNote = (isoDate: string): string =>\n `Includes time and expenses on tasks created before ${formatCutoffDate(\n isoDate\n )}.`;\n\nconst IgnoreTasksPicker = ({\n value,\n onChange,\n}: {\n value: string | null;\n onChange: (value: string | null) => void;\n}): ReactElement => {\n const selectedDays = useMemo(() => {\n if (!value) return undefined;\n const day = isoToUtcUnix(value);\n return { from: day, to: day };\n }, [value]);\n\n return (\n <SelectDate\n selectionMode=\"daily\"\n changeMode=\"instant\"\n enableYearPicker\n selectedDays={selectedDays}\n onSave={(dates) =>\n onChange(dates?.from ? unixToIso(Number(dates.from)) : null)\n }\n trigger={(label) => (\n <SelectTrigger\n id=\"pf-ignore-tasks\"\n className=\"pf-date-trigger\"\n typographyProps={{ color: value ? \"primary\" : \"quaternary\" }}\n >\n {label}\n </SelectTrigger>\n )}\n />\n );\n};\n\n/* Edit-only notes under the projects picker (custom portfolios). */\nexport const PORTFOLIO_PROJECTS_LOCKED_NOTE =\n \"Some of this portfolio's projects aren't shared with you, so its project list is locked here. Add or remove projects from the Projects tab.\";\n\nconst completedProjectsNote = (count: number): string =>\n count === 1\n ? \"1 project here has been completed and isn't listed. Remove it from the portfolio's Projects tab.\"\n : `${count} projects here have been completed and aren't listed. Remove them from the portfolio's Projects tab.`;\n\n/* ------------------------------------------------------------------ */\n/* Pickers */\n/* ------------------------------------------------------------------ */\n\n/* Group-by control: the SortGeneralIcon button the Invite-to-Projects picker\n shows as the search bar's right-side adornment. Controls grouping, not sort. */\nconst ProjectsGroupBy = ({\n selected,\n onChange,\n}: {\n selected: GroupBy;\n onChange: (groupBy: GroupBy) => void;\n}): ReactElement => (\n <Select\n keepSameOptionsOrder\n disableSearch\n disabledInternalSort\n forceCloseMenu\n position=\"bottom-end\"\n selected={selected}\n onChange={(value) => onChange(value as GroupBy)}\n options={GROUP_BY_OPTIONS}\n target={\n <IconButton type=\"button\" variant=\"text gray\">\n <SortGeneralIcon />\n </IconButton>\n }\n />\n);\n\nexport interface ProjectsPickerProps {\n selected: string[];\n onChange: (ids: string[]) => void;\n groupBy: GroupBy;\n onGroupBy: (groupBy: GroupBy) => void;\n invalid?: boolean;\n disabled?: boolean;\n /** Overrides the trigger element id (default \"pf-projects\") so the picker\n can be reused on a page that also renders the create/edit form. */\n triggerId?: string;\n}\n\nexport const ProjectsPicker = ({\n selected,\n onChange,\n groupBy,\n onGroupBy,\n invalid,\n disabled,\n triggerId = \"pf-projects\",\n}: ProjectsPickerProps): ReactElement => {\n const options = useMemo(() => groupPickerProjects(groupBy), [groupBy]);\n const count = selected.length;\n const triggerText =\n count === 0\n ? \"Choose projects\"\n : count === 1\n ? \"1 project selected\"\n : `${count} projects selected`;\n return (\n <Select\n type=\"multiple\"\n options={options}\n selected={selected}\n onChange={(value) => onChange(value as string[])}\n noResultText=\"No results\"\n endAdornment={\n disabled ? undefined : (\n <ProjectsGroupBy selected={groupBy} onChange={onGroupBy} />\n )\n }\n target={\n <SelectTrigger\n id={triggerId}\n className=\"pf-trigger\"\n invalid={invalid}\n disabled={disabled}\n typographyProps={{ color: count > 0 ? \"primary\" : \"quaternary\" }}\n >\n {triggerText}\n </SelectTrigger>\n }\n />\n );\n};\n\nconst ContextPicker = ({\n type,\n value,\n onChange,\n invalid,\n}: {\n type: PortfolioKind;\n value?: string;\n onChange: (value: string) => void;\n invalid?: boolean;\n}): ReactElement => {\n const options =\n type === \"category\"\n ? CATEGORIES.map((name) => ({ id: name, name }))\n : type === \"client\"\n ? CLIENTS.map((name) => ({ id: name, name }))\n : LEADERS_LIST.map((leader) => ({ id: leader.name, name: leader.name }));\n const placeholder =\n type === \"category\"\n ? \"Choose a category\"\n : type === \"client\"\n ? \"Choose a client\"\n : \"Choose a project leader\";\n return (\n <Select\n forceCloseMenu\n options={options}\n selected={value ?? \"\"}\n onChange={(next) => onChange(String(next))}\n target={\n <SelectTrigger\n id=\"pf-context\"\n className=\"pf-trigger\"\n invalid={invalid}\n typographyProps={{ color: value ? \"primary\" : \"quaternary\" }}\n >\n {value ?? placeholder}\n </SelectTrigger>\n }\n />\n );\n};\n\n/* ------------------------------------------------------------------ */\n/* The reusable form body */\n/* ------------------------------------------------------------------ */\n\nconst StyledDetailsForm = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n .field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n /* DS form controls are fixed-width (Input 360px, SelectTrigger 300px); let\n them fill the dialog column instead. */\n .field .c-input-wrapper {\n width: 100%;\n }\n\n .field .pf-trigger {\n width: 100%;\n }\n\n /* Date field: the app's date width (Duplicate Project's Start Date). */\n .field .pf-date-trigger {\n width: 160px;\n }\n`;\n\nexport interface PortfolioDetailsFieldsProps {\n values: PortfolioFormValues;\n onName: (value: string) => void;\n onContext: (value: string) => void;\n onProjects: (ids: string[]) => void;\n onGroupBy: (groupBy: GroupBy) => void;\n onVisibility: (value: PortfolioVisibility) => void;\n onIgnoreTasksCreatedBefore: (value: string | null) => void;\n /* Form pattern (propagating through the app): the submit button is ALWAYS\n enabled. On submit the consumer flips showErrors; each field then outlines\n itself (aria-invalid) while it is invalid, and clears once it becomes\n valid. No field disables submit. */\n showErrors: boolean;\n /** Edit only: the portfolio holds projects this viewer can't access, so the\n projects picker is locked and a note explains why. */\n projectsLocked?: boolean;\n /** Edit only: how many of the portfolio's projects are completed and so are\n not shown by the picker (which lists active projects only). */\n completedProjectsCount?: number;\n}\n\n/** Name + the type's picker + visibility. No Dialog wrappers and no action\n button — the consumer (create step or edit dialog) supplies those. */\nexport const PortfolioDetailsFields = ({\n values,\n onName,\n onContext,\n onProjects,\n onGroupBy,\n onVisibility,\n onIgnoreTasksCreatedBefore,\n showErrors,\n projectsLocked,\n completedProjectsCount,\n}: PortfolioDetailsFieldsProps): ReactElement => {\n const {\n type,\n name,\n context,\n projectIds,\n groupBy,\n visibility,\n ignoreTasksCreatedBefore,\n } = values;\n const nameInvalid = showErrors && name.trim().length === 0;\n const pickerInvalid =\n showErrors && (type === \"custom\" ? projectIds.length === 0 : !context);\n\n return (\n <StyledDetailsForm>\n <div className=\"field\">\n <Label htmlFor=\"pf-name\">Name</Label>\n <Input\n id=\"pf-name\"\n value={name}\n placeholder=\"Portfolio name\"\n invalid={nameInvalid}\n onChange={(event) => onName(event.target.value)}\n />\n </div>\n <div className=\"field\">\n <Label htmlFor={type === \"custom\" ? \"pf-projects\" : \"pf-context\"}>\n {contextFieldLabel(type)}\n </Label>\n {type === \"custom\" ? (\n <>\n <ProjectsPicker\n selected={projectIds}\n onChange={onProjects}\n groupBy={groupBy}\n onGroupBy={onGroupBy}\n invalid={pickerInvalid}\n disabled={projectsLocked}\n />\n {projectsLocked ? (\n <Caption1 color=\"tertiary\" className=\"pf-note\">\n {PORTFOLIO_PROJECTS_LOCKED_NOTE}\n </Caption1>\n ) : completedProjectsCount ? (\n <Caption1 color=\"tertiary\" className=\"pf-note\">\n {completedProjectsNote(completedProjectsCount)}\n </Caption1>\n ) : null}\n </>\n ) : (\n <ContextPicker\n type={type}\n value={context}\n onChange={onContext}\n invalid={pickerInvalid}\n />\n )}\n </div>\n <div className=\"field\">\n <Label htmlFor=\"pf-ignore-tasks\">{IGNORE_TASKS_FIELD_LABEL}</Label>\n <IgnoreTasksPicker\n value={ignoreTasksCreatedBefore}\n onChange={onIgnoreTasksCreatedBefore}\n />\n <Caption1 color=\"tertiary\" className=\"pf-note\">\n {IGNORE_TASKS_FIELD_EXPLAINER}\n </Caption1>\n </div>\n <div className=\"field\">\n <RadioGroup\n label=\"Visibility\"\n variant=\"plain\"\n value={visibility}\n onChange={(value) => onVisibility(value as PortfolioVisibility)}\n options={VISIBILITY_OPTIONS.map((option) => ({\n id: option.id,\n name: option.title,\n description: option.description,\n }))}\n />\n </div>\n </StyledDetailsForm>\n );\n};\n\nPortfolioDetailsFields.displayName = \"PortfolioDetailsFields\";\n\n/* ------------------------------------------------------------------ */\n/* Edit Portfolio dialog — the create wizard's step 2, on its own */\n/* ------------------------------------------------------------------ */\n\nexport interface EditPortfolioDialogProps {\n open: boolean;\n /** The portfolio's current values; the dialog seeds itself from these on\n open, so Cancel discards edits and Save commits them. */\n initialValues: PortfolioFormValues;\n onClose: () => void;\n onSave?: (values: PortfolioFormValues) => void;\n /** Edit only: lock the projects picker (the portfolio has projects this\n viewer can't access). */\n projectsLocked?: boolean;\n /** Edit only: number of completed projects the picker does not show. */\n completedProjectsCount?: number;\n}\n\n/*\n Same fields, same validation as create step 2. The type is fixed to the\n portfolio's kind (edit changes the details, not the kind), so there is no\n type radio here — only the name, the type's picker, and visibility.\n*/\nexport const EditPortfolioDialog = ({\n open,\n initialValues,\n onClose,\n onSave,\n projectsLocked,\n completedProjectsCount,\n}: EditPortfolioDialogProps): ReactElement => {\n const [values, setValues] = useState<PortfolioFormValues>(initialValues);\n const [showErrors, setShowErrors] = useState(false);\n\n /* Re-seed from the portfolio each time the dialog opens. */\n useEffect(() => {\n if (open) {\n setValues(initialValues);\n setShowErrors(false);\n }\n // Seed on open only — initialValues is read at that moment by design.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const patch = (next: Partial<PortfolioFormValues>): void =>\n setValues((current) => ({ ...current, ...next }));\n\n const handleSave = (): void => {\n if (!isPortfolioDetailsValid(values)) {\n setShowErrors(true);\n return;\n }\n onSave?.(values);\n onClose();\n };\n\n return (\n <Dialog open={open} onClose={onClose} disableCloseOnEsc>\n <Dialog.Title>Edit Portfolio</Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n <PortfolioDetailsFields\n values={values}\n onName={(name) => patch({ name })}\n onContext={(context) => patch({ context })}\n onProjects={(projectIds) => patch({ projectIds })}\n onGroupBy={(groupBy) => patch({ groupBy })}\n onVisibility={(visibility) => patch({ visibility })}\n onIgnoreTasksCreatedBefore={(ignoreTasksCreatedBefore) =>\n patch({ ignoreTasksCreatedBefore })\n }\n showErrors={showErrors}\n projectsLocked={projectsLocked}\n completedProjectsCount={completedProjectsCount}\n />\n </Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <Button\n variant=\"primary\"\n style={{ marginRight: \"12px\" }}\n onClick={handleSave}\n >\n Save Changes\n </Button>\n <Button variant=\"secondary\" data-action=\"cancel\" onClick={onClose}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n\nEditPortfolioDialog.displayName = \"EditPortfolioDialog\";\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEzE,OAAOC,MAAM,MAAM,mBAAmB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,EAAEA,cAAe;IAC/BC,sBAAsB,EAAEA;EAAuB,CAChD,CACa,CAAC,eACjBnK,KAAA,CAAAgH,aAAA,CAAC1G,MAAM,CAACmL,cAAc,MAAE,CAAC,eACzBzL,KAAA,CAAAgH,aAAA,CAAC1G,MAAM,CAACqL,OAAO,qBACb3L,KAAA,CAAAgH,aAAA,CAAC3G,MAAM;IACLgI,OAAO,EAAC,SAAS;IACjBuD,KAAK,EAAE;MAAEC,WAAW,EAAE;IAAO,CAAE;IAC/BC,OAAO,EAAER;EAAW,GACrB,cAEO,CAAC,eACTtL,KAAA,CAAAgH,aAAA,CAAC3G,MAAM;IAACgI,OAAO,EAAC,WAAW;IAAC,eAAY,QAAQ;IAACyD,OAAO,EAAEhB;EAAQ,GAAC,QAE3D,CACM,CACV,CAAC;AAEb,CAAC;AAEDJ,mBAAmB,CAAClB,WAAW,GAAG,qBAAqB","ignoreList":[]}
|
|
@@ -9,6 +9,17 @@ export declare const MD = "768px";
|
|
|
9
9
|
export declare const LG = "1024px";
|
|
10
10
|
export declare const XL = "1280px";
|
|
11
11
|
export declare const TRANSITION = "200ms ease";
|
|
12
|
+
/**
|
|
13
|
+
* The hatch the app draws over weekends and global days off (calendar.less,
|
|
14
|
+
* also on .project-calendar-week). Multiples of 1/sqrt(2) px keep every
|
|
15
|
+
* stripe on the pixel grid.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* The track of the list's estimate bar (ListTimeDetails.jsx), which the
|
|
19
|
+
* project calendar's WeekDueBar reuses under each day of the week.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DUE_BAR_TRACK = "light-dark(var(--color-theme-transparent-300), color-mix(in srgb, var(--color-theme-transparent-500) 37%, transparent))";
|
|
22
|
+
export declare const NON_WORKING_HATCH = "repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 4.95px,\n var(--border-primary) 4.95px,\n var(--border-primary) 5.657px\n )";
|
|
12
23
|
/** Mock avatar background colours (stand-ins for real user avatars). */
|
|
13
24
|
export declare const AVATAR_COLORS: {
|
|
14
25
|
yellow: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,wEAAwE;AACxE,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,oGAC4E,CAAC;AAC9F,eAAO,MAAM,IAAI,6DAA6D,CAAC"}
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/presentation/shared/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,EAAE,UAAU,CAAC;AAC1B,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,EAAE,WAAW,CAAC;AAC3B,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC;;;;GAIG;AACH;;;GAGG;AACH,eAAO,MAAM,aAAa,4HACiG,CAAC;AAE5H,eAAO,MAAM,iBAAiB,kKAM1B,CAAC;AAEL,wEAAwE;AACxE,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,oGAC4E,CAAC;AAC9F,eAAO,MAAM,IAAI,6DAA6D,CAAC"}
|
|
@@ -10,6 +10,18 @@ export const LG = "1024px";
|
|
|
10
10
|
export const XL = "1280px";
|
|
11
11
|
export const TRANSITION = "200ms ease";
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* The hatch the app draws over weekends and global days off (calendar.less,
|
|
15
|
+
* also on .project-calendar-week). Multiples of 1/sqrt(2) px keep every
|
|
16
|
+
* stripe on the pixel grid.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The track of the list's estimate bar (ListTimeDetails.jsx), which the
|
|
20
|
+
* project calendar's WeekDueBar reuses under each day of the week.
|
|
21
|
+
*/
|
|
22
|
+
export const DUE_BAR_TRACK = "light-dark(var(--color-theme-transparent-300), color-mix(in srgb, var(--color-theme-transparent-500) 37%, transparent))";
|
|
23
|
+
export const NON_WORKING_HATCH = "repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 4.95px,\n var(--border-primary) 4.95px,\n var(--border-primary) 5.657px\n )";
|
|
24
|
+
|
|
13
25
|
/** Mock avatar background colours (stand-ins for real user avatars). */
|
|
14
26
|
export const AVATAR_COLORS = {
|
|
15
27
|
yellow: "#F5B041",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":["BREAKPOINT","SM","MD","LG","XL","TRANSITION","AVATAR_COLORS","yellow","purple","blue","orange","green","teal","SANS","MONO"],"sources":["../../../../src/presentation/shared/tokens.ts"],"sourcesContent":["/**\n * Shared constants for the Presentation mock-ups.\n *\n * Breakpoints mirror new-activecollab-front (Tailwind sm / md / lg / xl).\n */\nexport const BREAKPOINT = 640;\nexport const SM = \"640px\";\nexport const MD = \"768px\";\nexport const LG = \"1024px\";\nexport const XL = \"1280px\";\nexport const TRANSITION = \"200ms ease\";\n\n/** Mock avatar background colours (stand-ins for real user avatars). */\nexport const AVATAR_COLORS = {\n yellow: \"#F5B041\",\n purple: \"#A569BD\",\n blue: \"#5499C7\",\n orange: \"#E67E22\",\n green: \"#32B370\",\n teal: \"#48C9B0\",\n};\n\n/**\n * Font stacks for the mock-ups.\n *\n * `SANS` mirrors the DS `FontStyle` stack. Presentation containers set it so raw\n * text that is not wrapped in Typography does not fall back to serif (there is\n * no global CSS reset in Storybook); text itself still goes through Typography.\n *\n * `MONO` is the monospace face the app uses for SHAs and inline code.\n */\nexport const SANS =\n '-apple-system, BlinkMacSystemFont, \"Inter\", \"Roboto\", \"Helvetica Neue\", Arial, sans-serif';\nexport const MONO = \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,UAAU,GAAG,GAAG;AAC7B,OAAO,MAAMC,EAAE,GAAG,OAAO;AACzB,OAAO,MAAMC,EAAE,GAAG,OAAO;AACzB,OAAO,MAAMC,EAAE,GAAG,QAAQ;AAC1B,OAAO,MAAMC,EAAE,GAAG,QAAQ;AAC1B,OAAO,MAAMC,UAAU,GAAG,YAAY;;AAEtC;AACA,OAAO,MAAMC,aAAa,GAAG;EAC3BC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAE,SAAS;EACjBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,GACf,2FAA2F;AAC7F,OAAO,MAAMC,IAAI,GAAG,0DAA0D","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["BREAKPOINT","SM","MD","LG","XL","TRANSITION","DUE_BAR_TRACK","NON_WORKING_HATCH","AVATAR_COLORS","yellow","purple","blue","orange","green","teal","SANS","MONO"],"sources":["../../../../src/presentation/shared/tokens.ts"],"sourcesContent":["/**\n * Shared constants for the Presentation mock-ups.\n *\n * Breakpoints mirror new-activecollab-front (Tailwind sm / md / lg / xl).\n */\nexport const BREAKPOINT = 640;\nexport const SM = \"640px\";\nexport const MD = \"768px\";\nexport const LG = \"1024px\";\nexport const XL = \"1280px\";\nexport const TRANSITION = \"200ms ease\";\n\n/**\n * The hatch the app draws over weekends and global days off (calendar.less,\n * also on .project-calendar-week). Multiples of 1/sqrt(2) px keep every\n * stripe on the pixel grid.\n */\n/**\n * The track of the list's estimate bar (ListTimeDetails.jsx), which the\n * project calendar's WeekDueBar reuses under each day of the week.\n */\nexport const DUE_BAR_TRACK =\n \"light-dark(var(--color-theme-transparent-300), color-mix(in srgb, var(--color-theme-transparent-500) 37%, transparent))\";\n\nexport const NON_WORKING_HATCH = `repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 4.95px,\n var(--border-primary) 4.95px,\n var(--border-primary) 5.657px\n )`;\n\n/** Mock avatar background colours (stand-ins for real user avatars). */\nexport const AVATAR_COLORS = {\n yellow: \"#F5B041\",\n purple: \"#A569BD\",\n blue: \"#5499C7\",\n orange: \"#E67E22\",\n green: \"#32B370\",\n teal: \"#48C9B0\",\n};\n\n/**\n * Font stacks for the mock-ups.\n *\n * `SANS` mirrors the DS `FontStyle` stack. Presentation containers set it so raw\n * text that is not wrapped in Typography does not fall back to serif (there is\n * no global CSS reset in Storybook); text itself still goes through Typography.\n *\n * `MONO` is the monospace face the app uses for SHAs and inline code.\n */\nexport const SANS =\n '-apple-system, BlinkMacSystemFont, \"Inter\", \"Roboto\", \"Helvetica Neue\", Arial, sans-serif';\nexport const MONO = \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,UAAU,GAAG,GAAG;AAC7B,OAAO,MAAMC,EAAE,GAAG,OAAO;AACzB,OAAO,MAAMC,EAAE,GAAG,OAAO;AACzB,OAAO,MAAMC,EAAE,GAAG,QAAQ;AAC1B,OAAO,MAAMC,EAAE,GAAG,QAAQ;AAC1B,OAAO,MAAMC,UAAU,GAAG,YAAY;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GACxB,yHAAyH;AAE3H,OAAO,MAAMC,iBAAiB,kKAM1B;;AAEJ;AACA,OAAO,MAAMC,aAAa,GAAG;EAC3BC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAE,SAAS;EACjBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,GACf,2FAA2F;AAC7F,OAAO,MAAMC,IAAI,GAAG,0DAA0D","ignoreList":[]}
|