@riboseinc/paneron-registry-kit 2.2.32 → 2.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/index.d.ts +2 -2
  2. package/index.js +3 -3
  3. package/index.js.map +1 -1
  4. package/item-classes/Tree.js +4 -6
  5. package/item-classes/Tree.js.map +1 -1
  6. package/package.json +2 -2
  7. package/{views/change-request → proposals}/ChangeRequestContext.d.ts +3 -2
  8. package/{views/change-request → proposals}/ChangeRequestContext.js +7 -7
  9. package/proposals/ChangeRequestContext.js.map +1 -0
  10. package/{views/ProposalHistoryDrawer.js → proposals/HistoryDrawer.js} +11 -13
  11. package/proposals/HistoryDrawer.js.map +1 -0
  12. package/{views/change-request/Summary.d.ts → proposals/MetaProperties.d.ts} +4 -3
  13. package/{views/change-request/Summary.js → proposals/MetaProperties.js} +9 -4
  14. package/proposals/MetaProperties.js.map +1 -0
  15. package/proposals/ProposalBrowser.d.ts +22 -0
  16. package/{views/change-request/Proposals.js → proposals/ProposalBrowser.js} +22 -204
  17. package/proposals/ProposalBrowser.js.map +1 -0
  18. package/proposals/ProposalDetail.d.ts +6 -0
  19. package/proposals/ProposalDetail.js +66 -0
  20. package/proposals/ProposalDetail.js.map +1 -0
  21. package/proposals/ProposalItem.d.ts +16 -0
  22. package/proposals/ProposalItem.js +57 -0
  23. package/proposals/ProposalItem.js.map +1 -0
  24. package/proposals/ProposalSummary.d.ts +6 -0
  25. package/proposals/ProposalSummary.js +62 -0
  26. package/proposals/ProposalSummary.js.map +1 -0
  27. package/proposals/ProposalType.d.ts +11 -0
  28. package/proposals/ProposalType.js +99 -0
  29. package/proposals/ProposalType.js.map +1 -0
  30. package/proposals/Search.d.ts +26 -0
  31. package/proposals/Search.js +108 -0
  32. package/proposals/Search.js.map +1 -0
  33. package/{views/change-request → proposals}/TransitionHistory.d.ts +3 -2
  34. package/{views/change-request → proposals}/TransitionHistory.js +18 -14
  35. package/proposals/TransitionHistory.js.map +1 -0
  36. package/{views/change-request → proposals}/TransitionOptions.d.ts +3 -3
  37. package/{views/change-request → proposals}/TransitionOptions.js +34 -12
  38. package/proposals/TransitionOptions.js.map +1 -0
  39. package/proposals/actionableGroups/Tree.js +22 -4
  40. package/proposals/actionableGroups/Tree.js.map +1 -1
  41. package/proposals/actionableGroups/queries.d.ts +0 -1
  42. package/proposals/actionableGroups/queries.js +7 -10
  43. package/proposals/actionableGroups/queries.js.map +1 -1
  44. package/proposals/actionableGroups/treeNodes.d.ts +1 -1
  45. package/proposals/actionableGroups/treeNodes.js +1 -1
  46. package/proposals/actionableGroups/treeNodes.js.map +1 -1
  47. package/proposals/index.d.ts +6 -0
  48. package/proposals/index.js +83 -0
  49. package/proposals/index.js.map +1 -0
  50. package/{views/change-request → proposals}/objectChangeset.d.ts +4 -3
  51. package/{views/change-request → proposals}/objectChangeset.js +5 -5
  52. package/proposals/objectChangeset.js.map +1 -0
  53. package/proposals/queries.d.ts +4 -0
  54. package/proposals/queries.js +14 -0
  55. package/proposals/queries.js.map +1 -0
  56. package/{types/cr.d.ts → proposals/types.d.ts} +78 -4
  57. package/{types/cr.js → proposals/types.js} +68 -2
  58. package/proposals/types.js.map +1 -0
  59. package/types/index.d.ts +0 -1
  60. package/types/index.js +0 -13
  61. package/types/index.js.map +1 -1
  62. package/types/views.d.ts +1 -1
  63. package/types/views.js.map +1 -1
  64. package/views/FilterCriteria/models.d.ts +2 -0
  65. package/views/FilterCriteria/models.js +12 -2
  66. package/views/FilterCriteria/models.js.map +1 -1
  67. package/views/GenericRelatedItemView.js +4 -4
  68. package/views/GenericRelatedItemView.js.map +1 -1
  69. package/views/RegisterStakeholder.d.ts +4 -1
  70. package/views/RegisterStakeholder.js +19 -13
  71. package/views/RegisterStakeholder.js.map +1 -1
  72. package/views/detail/ChangeRequest/index.js +10 -10
  73. package/views/detail/ChangeRequest/index.js.map +1 -1
  74. package/views/detail/ProposalWork.d.ts +8 -0
  75. package/views/detail/ProposalWork.js +173 -0
  76. package/views/detail/ProposalWork.js.map +1 -0
  77. package/views/detail/RegisterHome/ActiveProposalDetails.d.ts +1 -1
  78. package/views/detail/RegisterHome/ActiveProposalDetails.js +4 -4
  79. package/views/detail/RegisterHome/ActiveProposalDetails.js.map +1 -1
  80. package/views/detail/RegisterHome/Proposal.d.ts +1 -1
  81. package/views/detail/RegisterHome/Proposal.js +2 -6
  82. package/views/detail/RegisterHome/Proposal.js.map +1 -1
  83. package/views/detail/RegisterHome/index.js +10 -14
  84. package/views/detail/RegisterHome/index.js.map +1 -1
  85. package/views/detail/RegisterItem/index.d.ts +1 -1
  86. package/views/detail/RegisterItem/index.js +7 -7
  87. package/views/detail/RegisterItem/index.js.map +1 -1
  88. package/views/detail/RegisterItemClass.js +1 -1
  89. package/views/detail/RegisterItemClass.js.map +1 -1
  90. package/views/hooks/useRegisterVersion.d.ts +1 -0
  91. package/views/hooks/useRegisterVersion.js +43 -0
  92. package/views/hooks/useRegisterVersion.js.map +1 -0
  93. package/views/hooks/useSingleRegisterItemData.js.map +1 -1
  94. package/views/index.js +18 -12
  95. package/views/index.js.map +1 -1
  96. package/views/itemQueryUtils.d.ts +1 -1
  97. package/views/itemQueryUtils.js.map +1 -1
  98. package/views/protocolRegistry.d.ts +1 -0
  99. package/views/protocolRegistry.js +4 -0
  100. package/views/protocolRegistry.js.map +1 -1
  101. package/views/sidebar/Browse/index.js +2 -2
  102. package/views/sidebar/Browse/index.js.map +1 -1
  103. package/views/sidebar/Registration/index.d.ts +0 -1
  104. package/views/sidebar/Registration/index.js +9 -10
  105. package/views/sidebar/Registration/index.js.map +1 -1
  106. package/views/sidebar/Search/index.d.ts +3 -0
  107. package/views/sidebar/Search/index.js +8 -4
  108. package/views/sidebar/Search/index.js.map +1 -1
  109. package/views/util.js +1 -0
  110. package/views/util.js.map +1 -1
  111. package/types/cr.js.map +0 -1
  112. package/types/proposal.d.ts +0 -90
  113. package/types/proposal.js +0 -71
  114. package/types/proposal.js.map +0 -1
  115. package/views/ProposalHistoryDrawer.js.map +0 -1
  116. package/views/change-request/ChangeRequestContext.js.map +0 -1
  117. package/views/change-request/Proposals.d.ts +0 -40
  118. package/views/change-request/Proposals.js.map +0 -1
  119. package/views/change-request/Summary.js.map +0 -1
  120. package/views/change-request/TransitionHistory.js.map +0 -1
  121. package/views/change-request/TransitionOptions.js.map +0 -1
  122. package/views/change-request/objectChangeset.js.map +0 -1
  123. package/views/change-request/util.d.ts +0 -4
  124. package/views/change-request/util.js +0 -14
  125. package/views/change-request/util.js.map +0 -1
  126. /package/{views/ProposalHistoryDrawer.d.ts → proposals/HistoryDrawer.d.ts} +0 -0
@@ -3,39 +3,34 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Proposals = Proposals;
7
- exports.ProposalType = ProposalType;
8
- exports.default = exports.ProposalSummary = exports.ProposalDetail = void 0;
6
+ exports.ProposalBrowser = ProposalBrowser;
7
+ exports.default = void 0;
9
8
 
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
 
12
11
  var _react2 = require("@emotion/react");
13
12
 
14
- var _core = require("@blueprintjs/core");
15
-
16
13
  var _select = require("@blueprintjs/select");
17
14
 
18
- var _HelpTooltip = _interopRequireDefault(require("@riboseinc/paneron-extension-kit/widgets/HelpTooltip"));
15
+ var _core = require("@blueprintjs/core");
19
16
 
20
17
  var _ErrorBoundary = _interopRequireDefault(require("@riboseinc/paneron-extension-kit/widgets/ErrorBoundary"));
21
18
 
22
- var _ErrorState = _interopRequireDefault(require("@riboseinc/paneron-extension-kit/widgets/ErrorState"));
23
-
24
- var _protocolRegistry = require("../protocolRegistry");
19
+ var _itemPathUtils = require("../views/itemPathUtils");
25
20
 
26
- var _BrowserCtx = require("../BrowserCtx");
21
+ var _Block = require("../views/detail/RegisterHome/Block");
27
22
 
28
- var _itemPathUtils = require("../itemPathUtils");
23
+ var _BrowserCtx = require("../views/BrowserCtx");
29
24
 
30
- var _useItemClassConfig = _interopRequireDefault(require("../hooks/useItemClassConfig"));
25
+ var _protocolRegistry = require("../views/protocolRegistry");
31
26
 
32
- var _InlineDiff = require("../diffing/InlineDiff");
27
+ var _ProposalItem = require("./ProposalItem");
33
28
 
34
- var _util = require("./util");
29
+ var _ProposalType = _interopRequireDefault(require("./ProposalType"));
35
30
 
36
- var _Block = require("../detail/RegisterHome/Block");
31
+ var _ProposalSummary = _interopRequireDefault(require("./ProposalSummary"));
37
32
 
38
- var _RegisterItem = require("../detail/RegisterItem");
33
+ var _ProposalDetail = _interopRequireDefault(require("./ProposalDetail"));
39
34
 
40
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
36
 
@@ -46,18 +41,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
46
41
  /** @jsx jsx */
47
42
 
48
43
  /** @jsxFrag React.Fragment */
49
- function stringifiedJSONEqual(i1, i2) {
50
- return JSON.stringify(i1) === JSON.stringify(i2);
51
- }
44
+
52
45
  /**
53
46
  * Shows a list of individual proposed changes as cards by default,
54
47
  * allowing to expand a proposal and view item details.
55
48
  *
56
49
  * If no proposals exist, returns null.
57
50
  */
58
-
59
-
60
- function Proposals({
51
+ function ProposalBrowser({
61
52
  proposals,
62
53
  onDeleteProposalForItemAtPath,
63
54
  selectedItem,
@@ -170,13 +161,13 @@ function Proposals({
170
161
 
171
162
  const canShowDiff = haveSelectedItem && ((_a = proposals[selectedProposal]) === null || _a === void 0 ? void 0 : _a.type) === 'clarification' ? true : false;
172
163
  const showDiff = canShowDiff && preferDiff;
173
- const selectedItemSummary = haveSelectedItem ? (0, _react2.jsx)(ProposalSummary, {
164
+ const selectedItemSummary = haveSelectedItem ? (0, _react2.jsx)(_ProposalSummary.default, {
174
165
  itemRef: selectedItemRef,
175
166
  item: selectedItemProposed !== null && selectedItemProposed !== void 0 ? selectedItemProposed : selectedItemCurrent,
176
167
  itemBefore: selectedItemCurrent !== null && selectedItemCurrent !== void 0 ? selectedItemCurrent : undefined,
177
168
  proposal: proposals[selectedProposal]
178
169
  }) : (0, _react2.jsx)(_react.default.Fragment, null, "Select item\u2026");
179
- const icon = haveSelectedItem ? getProposalIcon(proposals[selectedProposal]) : undefined;
170
+ const icon = haveSelectedItem ? (0, _ProposalItem.getProposalIcon)(proposals[selectedProposal]) : undefined;
180
171
  const selectedItemDrawer = (0, _react.useMemo)(() => {
181
172
  var _a;
182
173
 
@@ -214,7 +205,7 @@ function Proposals({
214
205
  matchTargetWidth: true
215
206
  },
216
207
  fill: true,
217
- itemRenderer: ChangeProposalItemView,
208
+ itemRenderer: _ProposalItem.ChangeProposalItemView,
218
209
  onItemSelect: handleItemSelect
219
210
  }, (0, _react2.jsx)(_core.Button, {
220
211
  fill: true,
@@ -233,7 +224,7 @@ function Proposals({
233
224
  value: proposalBrowserCtx
234
225
  }, (0, _react2.jsx)(_ErrorBoundary.default, {
235
226
  viewName: "Proposal detail"
236
- }, (0, _react2.jsx)(ProposalDetail, {
227
+ }, (0, _react2.jsx)(_ProposalDetail.default, {
237
228
  itemRef: selectedItemRef,
238
229
  showDiff: showDiff,
239
230
  //showOnlyChanged={showOnlyChanged}
@@ -265,13 +256,13 @@ function Proposals({
265
256
  `,
266
257
  description: `${cpi.proposal.type} proposal`,
267
258
  key: cpi.itemPath
268
- }, (0, _react2.jsx)(ProposalType, {
259
+ }, (0, _react2.jsx)(_ProposalType.default, {
269
260
  proposal: cpi.proposal
270
261
  }), (0, _react2.jsx)("div", {
271
262
  css: (0, _react2.css)`padding: 5px; flex-grow: 1;`
272
263
  }, cpi.item !== null ? (0, _react2.jsx)(_core.H5, {
273
264
  css: (0, _react2.css)`margin: 0; overflow: hidden; text-overflow: ellipsis;`
274
- }, (0, _react2.jsx)(ProposalSummary, {
265
+ }, (0, _react2.jsx)(_ProposalSummary.default, {
275
266
  itemRef: cpi.itemRef,
276
267
  proposal: cpi.proposal,
277
268
  itemBefore: cpi.itemBefore,
@@ -284,182 +275,9 @@ function Proposals({
284
275
 
285
276
  ;
286
277
 
287
- function ProposalType({
288
- proposal
289
- }) {
290
- const proposalConfig = proposal.type === 'amendment' ? PROPOSAL_VIEWS[proposal.amendmentType] : PROPOSAL_VIEWS[proposal.type]; //const ProposalTypeLabel: React.FC<ProposalProps<any>> = proposalConfig.summary;
291
-
292
- const tagProps = (0, _util.proposalToTagProps)(proposal);
293
- return (0, _react2.jsx)(_core.Tag, {
294
- minimal: true,
295
- ...tagProps,
296
- rightIcon: (0, _react2.jsx)(_HelpTooltip.default, {
297
- content: (0, _react2.jsx)(_react.default.Fragment, null, "Proposed to be ", proposalConfig.hint)
298
- })
299
- });
300
- }
301
-
302
- const ChangeProposalItemView = (item, {
303
- handleClick,
304
- modifiers,
305
- query
306
- }) => {
307
- if (item.item !== null) {
308
- const i = item;
309
- return (0, _react2.jsx)(_core.MenuItem, {
310
- active: modifiers.active,
311
- disabled: modifiers.disabled,
312
- labelElement: (0, _react2.jsx)(ProposalType, {
313
- proposal: i.proposal
314
- }),
315
- key: item.itemPath,
316
- onClick: handleClick,
317
- icon: getProposalIcon(item.proposal),
318
- text: (0, _react2.jsx)(ProposalSummary, { ...i
319
- })
320
- });
321
- } else {
322
- return (0, _react2.jsx)(_core.MenuItem, {
323
- disabled: true,
324
- icon: "heart-broken",
325
- onClick: handleClick,
326
- text: `Broken proposal entry at path ${item.itemPath}`
327
- });
328
- }
329
- };
330
-
331
- const ProposalDetail = (0, _react.memo)(function ({
332
- proposal,
333
- showDiff,
334
- showOnlyChanged,
335
- itemRef,
336
- item,
337
- itemBefore,
338
- onChange
339
- }) {
340
- var _a;
341
-
342
- const itemClass = (0, _useItemClassConfig.default)((_a = itemRef.classID) !== null && _a !== void 0 ? _a : 'NONEXISTENT_CLASS_ID');
343
-
344
- if (!itemClass) {
345
- throw new Error(`Unknown item class “${itemRef.classID}”!`);
346
- }
347
-
348
- const view = showDiff ? (0, _react2.jsx)(_InlineDiff.InlineDiffGeneric, {
349
- item1: itemBefore !== null && itemBefore !== void 0 ? itemBefore : {},
350
- item2: item,
351
- css: (0, _react2.css)`
352
- position: absolute; inset: 0; padding: 10px; overflow: auto;
353
- background-color: white;
354
- .bp4-dark & {
355
- background-color: ${_core.Colors.DARK_GRAY2};
356
- }
357
- `,
358
- className: `${_core.Classes.ELEVATION_2} ${_core.Classes.RUNNING_TEXT}`
359
- }) : (0, _react2.jsx)(_RegisterItem.ItemDetail, {
360
- itemRef: itemRef,
361
- item: item,
362
- itemClass: itemClass,
363
- key: JSON.stringify(itemRef),
364
- compactHeader: true
365
- });
366
- return (0, _react2.jsx)("div", {
367
- css: (0, _react2.css)`position: absolute; inset: 0; display: flex; flex-flow: column;`
368
- }, view);
369
- });
370
- exports.ProposalDetail = ProposalDetail;
371
-
372
- const ProposalSummary = function ({
373
- proposal,
374
- itemRef,
375
- item,
376
- itemBefore,
377
- onChange
378
- }) {
379
- var _a;
380
-
381
- const {
382
- itemClasses
383
- } = (0, _react.useContext)(_BrowserCtx.BrowserCtx);
384
- const {
385
- classID
386
- } = itemRef;
387
- const cls = itemClasses[classID];
388
- const ListItemView = (_a = cls === null || cls === void 0 ? void 0 : cls.views) === null || _a === void 0 ? void 0 : _a.listItemView;
389
-
390
- if (ListItemView) {
391
- return (0, _react2.jsx)("span", {
392
- css: (0, _react2.css)`
393
- display: inline-flex;
394
- flex-flow: row nowrap;
395
- align-items: baseline;
396
- `
397
- }, (0, _react2.jsx)(ListItemView, {
398
- itemRef: itemRef,
399
- itemData: item.data,
400
- css: (0, _react2.css)`text-overflow: ellipsis; overflow: hidden;`
401
- }), "\u2003", (0, _react2.jsx)("small", null, cls.meta.title));
402
- } else {
403
- return (0, _react2.jsx)(_ErrorState.default, {
404
- viewName: "list item view",
405
- inline: true,
406
- error: "unable to load list item view"
407
- });
408
- }
409
- };
410
-
411
- exports.ProposalSummary = ProposalSummary;
412
- const clarification = {
413
- hint: (0, _react2.jsx)(_react.default.Fragment, null, "altered to represent the same concept more clearly."),
414
- summary: (0, _react.memo)(({
415
- proposal,
416
- item,
417
- itemRef
418
- }) => (0, _react2.jsx)(_react.default.Fragment, null, "Clarification"), () => true)
419
- };
420
- const addition = {
421
- hint: (0, _react2.jsx)(_react.default.Fragment, null, "added to this register."),
422
- summary: (0, _react.memo)(({
423
- proposal,
424
- item,
425
- itemRef
426
- }) => (0, _react2.jsx)(_react.default.Fragment, null, "Addition"), () => true)
427
- };
428
- const retirement = {
429
- hint: (0, _react2.jsx)(_react.default.Fragment, null, "marked as no longer current. (Note that this register is append-only, so the item cannot be removed altogether.)"),
430
- summary: (0, _react.memo)(({
431
- proposal,
432
- itemRef,
433
- item
434
- }) => (0, _react2.jsx)(_react.default.Fragment, null, "Retirement"), () => true)
435
- };
436
- const supersession = {
437
- hint: (0, _react2.jsx)(_react.default.Fragment, null, "removed from the register with another item recommended for use in its place. A relation between the superseding and superseded item will be created, though the exact semantics of that relation depend on the register."),
438
- summary: (0, _react.memo)(({
439
- proposal,
440
- itemRef,
441
- item
442
- }) => (0, _react2.jsx)(_react.default.Fragment, null, "Supersession"), () => true)
443
- };
444
- const invalidation = {
445
- hint: (0, _react2.jsx)(_react.default.Fragment, null, "marked as invalid. The exact semantics of invalidation depend on the register."),
446
- summary: (0, _react.memo)(({
447
- proposal,
448
- itemRef,
449
- item
450
- }) => (0, _react2.jsx)(_react.default.Fragment, null, "Invalidation"), () => true)
451
- };
452
- const PROPOSAL_VIEWS = {
453
- clarification,
454
- addition,
455
- retirement,
456
- supersession,
457
- invalidation
458
- };
459
-
460
- function getProposalIcon(proposal) {
461
- return proposal.type === 'addition' ? 'add' : proposal.type === 'clarification' ? 'edit' : 'ban-circle';
278
+ function stringifiedJSONEqual(i1, i2) {
279
+ return JSON.stringify(i1) === JSON.stringify(i2);
462
280
  }
463
281
 
464
- var _default = Proposals;
282
+ var _default = ProposalBrowser;
465
283
  exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProposalBrowser.js","sourceRoot":"","sources":["../../src/proposals/ProposalBrowser.tsx"],"names":[],"mappings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AE,GAAG,CAAC,QAAQ;gBACnB,IAAC,YAAY,IAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,GAAI;gBACxC,aAAK,GAAG,EAAE,GAAG,CAAA,6BAA6B,IACvC,GAAG,CAAC,IAAI,KAAK,IAAI;oBAChB,CAAC,CAAC,IAAC,EAAE,IAAC,GAAG,EAAE,GAAG,CAAA,uDAAuD;wBACjE,IAAC,eAAe,IACd,OAAO,EAAE,GAAG,CAAC,OAAO,EACpB,QAAQ,EAAE,GAAG,CAAC,QAAQ,EACtB,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,IAAI,EAAE,GAAG,CAAC,IAAI,GACd,CACC;oBACP,CAAC,CAAC,gEAAwC,CACxC;gBACL,OAAO,CAAC,MAAM,GAAG,CAAC;oBACjB,CAAC,CAAC,IAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,GAAI;oBACxC,CAAC,CAAC,IAAI,CACM,CAAA;QAClB,CAAC,CAAC,CACD,CACJ,CAAC;AACJ,CAAC;AAAA,CAAC;AAEF,SAAS,oBAAoB,CAAC,EAAO,EAAE,EAAO;IAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,eAAe,eAAe,CAAC","sourcesContent":["\n/** @jsx jsx */\n/** @jsxFrag React.Fragment */\n\nimport React, { useContext, useState, useCallback, useMemo } from 'react';\nimport { ClassNames, jsx, css } from '@emotion/react';\nimport { Select2 as Select } from '@blueprintjs/select';\nimport { ButtonGroup, Button, H5, Drawer, DrawerSize } from '@blueprintjs/core';\nimport type { MenuItemProps, MenuDividerProps } from '@blueprintjs/core';\n\nimport ErrorBoundary from '@riboseinc/paneron-extension-kit/widgets/ErrorBoundary';\n\nimport { useItemRef, itemPathToItemRef } from '../views/itemPathUtils';\nimport { HomeBlockCard, HomeBlockActions } from '../views/detail/RegisterHome/Block';\nimport { BrowserCtx, type BrowserCtx as BrowserCtxType } from '../views/BrowserCtx';\nimport { Protocols, type Protocol } from '../views/protocolRegistry';\n\nimport type { Drafted } from './types';\nimport { type ChangeProposalItem, ChangeProposalItemView, getProposalIcon } from './ProposalItem';\nimport ProposalType from './ProposalType';\nimport ProposalSummary from './ProposalSummary';\nimport ProposalDetail from './ProposalDetail';\n\n\ninterface ProposalBrowserProps<CR extends Drafted> {\n proposals: CR['items']\n\n selectedItem?: (string & keyof CR['items']) | null\n onSelectItem: (selectedItem: (string & keyof CR['items']) | null) => void\n\n /**\n * If provided, button to delete each proposed change\n * is shown in change card list mode.\n */\n onDeleteProposalForItemAtPath?: (itemPath: string) => void\n}\n/**\n * Shows a list of individual proposed changes as cards by default,\n * allowing to expand a proposal and view item details.\n *\n * If no proposals exist, returns null.\n */\nexport function ProposalBrowser<CR extends Drafted>\n({ proposals, onDeleteProposalForItemAtPath, selectedItem, onSelectItem: selectProposal }:\nProposalBrowserProps<CR>) {\n const [ preferDiff, setPreferDiff ] = useState(false);\n\n const selectedProposal = selectedItem ?? null;\n\n // TODO: Temporarily unsupported\n // (limitations of current change annotation implementation)\n //const [ showOnlyChanged, setShowOnlyChanged ] = useState(true);\n\n const outerBrowserCtx = useContext(BrowserCtx);\n const { jumpTo, subregisters, useRegisterItemData } = outerBrowserCtx;\n\n /**\n * When jumping to an item affected by current CR,\n * jump in-CR instead of spawning tab.\n */\n const handleCRJump = useCallback(function _handleCRJump(uri: `${Protocol}:${string}`): void {\n if (uri.startsWith(Protocols.ITEM_DETAILS)) {\n const itemPath = uri.split(':')[1];\n if (proposals[itemPath]) {\n selectProposal(itemPath);\n } else {\n jumpTo?.(uri);\n }\n }\n }, [Object.keys(proposals), jumpTo]);\n\n const proposalBrowserCtx: BrowserCtxType = useMemo((() => ({\n ...outerBrowserCtx,\n jumpTo: handleCRJump,\n })), [handleCRJump, outerBrowserCtx]);\n\n /** Paths of register items in proposal. */\n const proposedItemPaths = Object.entries(proposals).map(([itemPath, proposal]) => {\n if (proposal.type === 'clarification' || proposal.type === 'addition') {\n return itemPath;\n } else {\n return undefined;\n }\n }).filter(s => s !== undefined) as string[];\n\n /** Proposed data of register items in proposal. */\n const proposedItemDataReq = useRegisterItemData({\n itemPaths: proposedItemPaths,\n });\n\n /** Pre-existing data of register items in proposal. */\n const currentItemDataReq = useRegisterItemData({\n itemPaths: Object.keys(proposals),\n ignoreActiveCR: true,\n });\n\n const getCurrentItem = useCallback(\n ((itemPath: string) => currentItemDataReq.value[itemPath] ?? null),\n [currentItemDataReq.value]);\n const getProposedItem = useCallback(\n ((itemPath: string) => proposedItemDataReq.value[itemPath] ?? null),\n [proposedItemDataReq.value]);\n\n /** Current register item (if any) corresponding to selected proposal. */\n const selectedItemCurrent = selectedProposal ? getCurrentItem(selectedProposal) : null;\n\n /** Proposed register item corresponding to selected proposal. */\n const selectedItemProposed = selectedProposal ? getProposedItem(selectedProposal) : null;\n\n const selectedItemRef = useItemRef(subregisters !== undefined, selectedProposal);\n\n const handleItemSelect = useCallback(\n ((item: ChangeProposalItem) => selectProposal(item.itemPath)),\n [selectProposal]);\n\n const activeItem: ChangeProposalItem | null = useMemo((() =>\n selectedProposal\n ? ({\n itemPath: selectedProposal,\n proposal: proposals[selectedProposal],\n item: (selectedItemProposed ?? selectedItemCurrent)!,\n itemBefore: selectedItemCurrent ?? undefined,\n itemRef: itemPathToItemRef(subregisters !== undefined, selectedProposal),\n })\n : null\n ), [selectedProposal, proposals, subregisters]);\n\n const allItems: ChangeProposalItem[] = useMemo((() =>\n Object.entries(proposals).map(([itemPath, proposal]) => ({\n itemPath,\n proposal,\n item: (getProposedItem(itemPath) ?? getCurrentItem(itemPath))! ?? null,\n itemBefore: undefined,\n itemRef: itemPathToItemRef(subregisters !== undefined, itemPath),\n }))\n ), [proposals, getCurrentItem, getProposedItem, subregisters !== undefined]);\n\n const haveSelectedItem =\n selectedProposal\n && selectedItemRef\n && proposals[selectedProposal]\n && (selectedItemProposed || selectedItemCurrent);\n\n const proposalCount = Object.keys(proposals).length;\n\n //useEffect(() => {\n // // if (!selectedProposal) {\n // // const firstProposal = Object.keys(proposals)[0];\n // // if (firstProposal) {\n // // if (getCurrentItem(firstProposal) || getProposedItem(firstProposal)) {\n // // selectProposal(firstProposal);\n // // }\n // // }\n // // }\n // if (selectedProposal) {\n // if (selectedProposalDetailRef.current) {\n // selectedProposalDetailRef.current.scrollIntoView({ block: 'center' });\n // }\n // }\n //}, [selectedProposal === null]);\n\n const canShowDiff: boolean =\n haveSelectedItem && proposals[selectedProposal]?.type === 'clarification'\n ? true\n : false;\n const showDiff = canShowDiff && preferDiff;\n\n const selectedItemSummary = haveSelectedItem\n ? <ProposalSummary\n itemRef={selectedItemRef}\n item={(selectedItemProposed ?? selectedItemCurrent)!}\n itemBefore={selectedItemCurrent ?? undefined}\n proposal={proposals[selectedProposal]}\n />\n : <>Select item…</>;\n const icon = haveSelectedItem\n ? getProposalIcon(proposals[selectedProposal])\n : undefined;\n\n const selectedItemDrawer = useMemo((() =>\n <Drawer\n isOpen={proposalCount > 0 && haveSelectedItem ? true : false}\n onClose={() => selectProposal(null)}\n size={DrawerSize.LARGE}\n enforceFocus={false}>\n {proposalCount > 0 && haveSelectedItem\n ? <>\n <ButtonGroup>\n <Button\n disabled={!jumpTo || proposals[selectedProposal]?.type === 'addition'}\n icon='open-application'\n onClick={() => jumpTo?.(`${Protocols.ITEM_DETAILS}:${selectedProposal}`)}\n title=\"Open selected item in a new tab (not applicable to proposed additions)\"\n />\n <Button\n active={preferDiff}\n onClick={() => setPreferDiff(v => !v)}\n // Diffing only makes sense for clarifications.\n // Additions are entire new items, and for amendments\n // item data is unchanged.\n disabled={!canShowDiff}\n text=\"Compare\"\n title=\"Annotate proposed clarifications for this item\"\n />\n <ClassNames>\n {(({ css: css2 }) =>\n <Select<ChangeProposalItem>\n filterable={false}\n itemsEqual={stringifiedJSONEqual}\n menuProps={{ className: css2(`max-height: 50vh; overflow-y: auto;`) }}\n activeItem={activeItem}\n items={allItems}\n popoverProps={{ minimal: true, matchTargetWidth: true }}\n fill\n itemRenderer={ChangeProposalItemView}\n onItemSelect={handleItemSelect}>\n <Button\n fill\n rightIcon=\"chevron-down\"\n icon={icon}\n title=\"Switch between items in this proposal\"\n css={css`white-space: nowrap;`}>\n {selectedItemSummary}\n </Button>\n </Select>\n )}\n </ClassNames>\n <Button\n onClick={() => selectProposal(null)}\n icon=\"minimize\"\n title=\"Minimize proposed change view\"\n text=\"Minimize\"\n />\n </ButtonGroup>\n <div css={css`position: relative; flex: 1;`}>\n <BrowserCtx.Provider value={proposalBrowserCtx}>\n <ErrorBoundary viewName=\"Proposal detail\">\n <ProposalDetail\n itemRef={selectedItemRef}\n showDiff={showDiff}\n //showOnlyChanged={showOnlyChanged}\n item={(selectedItemProposed ?? selectedItemCurrent)!}\n itemBefore={selectedItemCurrent ?? undefined}\n proposal={proposals[selectedProposal]}\n />\n </ErrorBoundary>\n </BrowserCtx.Provider>\n </div>\n </>\n : null}\n </Drawer>\n ), [proposalCount > 0, haveSelectedItem, selectedItemProposed, selectedItemCurrent, preferDiff, jumpTo, handleItemSelect, selectedProposal && proposals[selectedProposal]]);\n\n return (\n <>\n {selectedItemDrawer}\n {allItems.map(cpi => {\n const actions: (MenuItemProps | MenuDividerProps)[] = [{\n onClick: () => selectProposal(cpi.itemPath),\n text: \"Expand\",\n title: \"Expand proposed change to see item details\",\n icon: 'maximize',\n }];\n if (onDeleteProposalForItemAtPath) {\n actions.push({\n text: \"Delete this proposal\",\n intent: 'danger',\n onClick: () => onDeleteProposalForItemAtPath(cpi.itemPath),\n icon: 'trash',\n });\n }\n return <HomeBlockCard\n css={css`\n flex-basis: calc(33.33% - 10px*2/3);\n `}\n description={`${cpi.proposal.type} proposal`}\n key={cpi.itemPath}>\n <ProposalType proposal={cpi.proposal} />\n <div css={css`padding: 5px; flex-grow: 1;`}>\n {cpi.item !== null\n ? <H5 css={css`margin: 0; overflow: hidden; text-overflow: ellipsis;`}>\n <ProposalSummary\n itemRef={cpi.itemRef}\n proposal={cpi.proposal}\n itemBefore={cpi.itemBefore}\n item={cpi.item}\n />\n </H5>\n : <>Problem reading proposed item data.</>}\n </div>\n {actions.length > 0\n ? <HomeBlockActions actions={actions} />\n : null}\n </HomeBlockCard>\n })}\n </>\n );\n};\n\nfunction stringifiedJSONEqual(i1: any, i2: any): boolean {\n return JSON.stringify(i1) === JSON.stringify(i2);\n}\n\nexport default ProposalBrowser;\n"]}
@@ -0,0 +1,6 @@
1
+ /** @jsx jsx */
2
+ /** @jsxFrag React.Fragment */
3
+ import React from 'react';
4
+ import type { ProposalProps, ChangeProposal } from './types';
5
+ export declare const ProposalDetail: React.FC<ProposalProps<ChangeProposal>>;
6
+ export default ProposalDetail;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.ProposalDetail = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var _react2 = require("@emotion/react");
11
+
12
+ var _core = require("@blueprintjs/core");
13
+
14
+ var _InlineDiff = require("../views/diffing/InlineDiff");
15
+
16
+ var _useItemClassConfig = _interopRequireDefault(require("../views/hooks/useItemClassConfig"));
17
+
18
+ var _RegisterItem = require("../views/detail/RegisterItem");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ /** @jsx jsx */
23
+
24
+ /** @jsxFrag React.Fragment */
25
+ const ProposalDetail = (0, _react.memo)(function ({
26
+ proposal,
27
+ showDiff,
28
+ showOnlyChanged,
29
+ itemRef,
30
+ item,
31
+ itemBefore,
32
+ onChange
33
+ }) {
34
+ var _a;
35
+
36
+ const itemClass = (0, _useItemClassConfig.default)((_a = itemRef.classID) !== null && _a !== void 0 ? _a : 'NONEXISTENT_CLASS_ID');
37
+
38
+ if (!itemClass) {
39
+ throw new Error(`Unknown item class “${itemRef.classID}”!`);
40
+ }
41
+
42
+ const view = showDiff ? (0, _react2.jsx)(_InlineDiff.InlineDiffGeneric, {
43
+ item1: itemBefore !== null && itemBefore !== void 0 ? itemBefore : {},
44
+ item2: item,
45
+ css: (0, _react2.css)`
46
+ position: absolute; inset: 0; padding: 10px; overflow: auto;
47
+ background-color: white;
48
+ .bp4-dark & {
49
+ background-color: ${_core.Colors.DARK_GRAY2};
50
+ }
51
+ `,
52
+ className: `${_core.Classes.ELEVATION_2} ${_core.Classes.RUNNING_TEXT}`
53
+ }) : (0, _react2.jsx)(_RegisterItem.ItemDetail, {
54
+ itemRef: itemRef,
55
+ item: item,
56
+ itemClass: itemClass,
57
+ key: JSON.stringify(itemRef),
58
+ compactHeader: true
59
+ });
60
+ return (0, _react2.jsx)("div", {
61
+ css: (0, _react2.css)`position: absolute; inset: 0; display: flex; flex-flow: column;`
62
+ }, view);
63
+ });
64
+ exports.ProposalDetail = ProposalDetail;
65
+ var _default = ProposalDetail;
66
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProposalDetail.js","sourceRoot":"","sources":["../../src/proposals/ProposalDetail.tsx"],"names":[],"mappings":"AAAA,eAAe;AACf,8BAA8B;AAE9B,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAK1D,MAAM,CAAC,MAAM,cAAc,GAC3B,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE;;IACzF,MAAM,SAAS,GAAG,kBAAkB,CAAC,MAAA,OAAO,CAAC,OAAO,mCAAI,sBAAsB,CAAC,CAAC;IAEhF,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;KAC7D;IAED,MAAM,IAAI,GAAgB,QAAQ;QAChC,CAAC,CAAC,IAAC,iBAAiB,IAChB,KAAK,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,EACvB,KAAK,EAAE,IAAI,EACX,GAAG,EAAE,GAAG,CAAA;;;;gCAIgB,MAAM,CAAC,UAAU;;SAExC,EACD,SAAS,EAAE,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,YAAY,EAAE,GAC3D;QACJ,CAAC,CAAC,IAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC5B,aAAa,SACb,CAAC;IAEP,OAAO,aAAK,GAAG,EAAE,GAAG,CAAA,iEAAiE,IAClF,IAAI,CACD,CAAC;AACT,CAAC,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC","sourcesContent":["/** @jsx jsx */\n/** @jsxFrag React.Fragment */\n\nimport React, { memo } from 'react';\nimport { jsx, css } from '@emotion/react';\nimport { Classes, Colors } from '@blueprintjs/core';\n\nimport { InlineDiffGeneric } from '../views/diffing/InlineDiff';\nimport useItemClassConfig from '../views/hooks/useItemClassConfig';\nimport { ItemDetail } from '../views/detail/RegisterItem';\n\nimport type { ProposalProps, ChangeProposal } from './types';\n\n\nexport const ProposalDetail: React.FC<ProposalProps<ChangeProposal>> =\nmemo(function ({ proposal, showDiff, showOnlyChanged, itemRef, item, itemBefore, onChange }) {\n const itemClass = useItemClassConfig(itemRef.classID ?? 'NONEXISTENT_CLASS_ID');\n\n if (!itemClass) {\n throw new Error(`Unknown item class “${itemRef.classID}”!`);\n }\n\n const view: JSX.Element = showDiff\n ? <InlineDiffGeneric\n item1={itemBefore ?? {}}\n item2={item}\n css={css`\n position: absolute; inset: 0; padding: 10px; overflow: auto;\n background-color: white;\n .bp4-dark & {\n background-color: ${Colors.DARK_GRAY2};\n }\n `}\n className={`${Classes.ELEVATION_2} ${Classes.RUNNING_TEXT}`}\n />\n : <ItemDetail\n itemRef={itemRef}\n item={item}\n itemClass={itemClass}\n key={JSON.stringify(itemRef)}\n compactHeader\n />;\n\n return <div css={css`position: absolute; inset: 0; display: flex; flex-flow: column;`}>\n {view}\n </div>;\n});\n\nexport default ProposalDetail;\n"]}
@@ -0,0 +1,16 @@
1
+ /** @jsx jsx */
2
+ /** @jsxFrag React.Fragment */
3
+ import { type ItemRenderer } from '@blueprintjs/select';
4
+ import { type IconName } from '@blueprintjs/core';
5
+ import type { InternalItemReference, Payload, RegisterItem } from '../types';
6
+ import type { ChangeProposal } from './types';
7
+ export interface ChangeProposalItem {
8
+ itemPath: string;
9
+ itemRef: InternalItemReference;
10
+ proposal: ChangeProposal;
11
+ item: RegisterItem<Payload> | null;
12
+ itemBefore: RegisterItem<Payload> | undefined;
13
+ }
14
+ export declare const ChangeProposalItemView: ItemRenderer<ChangeProposalItem>;
15
+ export default ChangeProposalItemView;
16
+ export declare function getProposalIcon(proposal: ChangeProposal): IconName;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getProposalIcon = getProposalIcon;
7
+ exports.default = exports.ChangeProposalItemView = void 0;
8
+
9
+ var _react = require("@emotion/react");
10
+
11
+ var _core = require("@blueprintjs/core");
12
+
13
+ var _ProposalSummary = _interopRequireDefault(require("./ProposalSummary"));
14
+
15
+ var _ProposalType = _interopRequireDefault(require("./ProposalType"));
16
+
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+
19
+ /** @jsx jsx */
20
+
21
+ /** @jsxFrag React.Fragment */
22
+ const ChangeProposalItemView = (item, {
23
+ handleClick,
24
+ modifiers,
25
+ query
26
+ }) => {
27
+ if (item.item !== null) {
28
+ const i = item;
29
+ return (0, _react.jsx)(_core.MenuItem, {
30
+ active: modifiers.active,
31
+ disabled: modifiers.disabled,
32
+ labelElement: (0, _react.jsx)(_ProposalType.default, {
33
+ proposal: i.proposal
34
+ }),
35
+ key: item.itemPath,
36
+ onClick: handleClick,
37
+ icon: getProposalIcon(item.proposal),
38
+ text: (0, _react.jsx)(_ProposalSummary.default, { ...i
39
+ })
40
+ });
41
+ } else {
42
+ return (0, _react.jsx)(_core.MenuItem, {
43
+ disabled: true,
44
+ icon: "heart-broken",
45
+ onClick: handleClick,
46
+ text: `Broken proposal entry at path ${item.itemPath}`
47
+ });
48
+ }
49
+ };
50
+
51
+ exports.ChangeProposalItemView = ChangeProposalItemView;
52
+ var _default = ChangeProposalItemView;
53
+ exports.default = _default;
54
+
55
+ function getProposalIcon(proposal) {
56
+ return proposal.type === 'addition' ? 'add' : proposal.type === 'clarification' ? 'edit' : 'ban-circle';
57
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProposalItem.js","sourceRoot":"","sources":["../../src/proposals/ProposalItem.tsx"],"names":[],"mappings":"AAAA,eAAe;AACf,8BAA8B;AAI9B,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAiB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQ5D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAU1C,MAAM,CAAC,MAAM,sBAAsB,GACnC,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;QACtB,MAAM,CAAC,GAAG,IAAwD,CAAC;QACnE,OAAO,CACL,IAAC,QAAQ,IACP,MAAM,EAAE,SAAS,CAAC,MAAM,EACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAC5B,YAAY,EAAE,IAAC,YAAY,IAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,GAAI,EACpD,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EACpC,IAAI,EAAE,IAAC,eAAe,OAAK,CAAC,GAAI,GAAI,CACvC,CAAC;KACH;SAAM;QACL,OAAO,IAAC,QAAQ,IACd,QAAQ,QACR,IAAI,EAAC,cAAc,EACnB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,iCAAiC,IAAI,CAAC,QAAQ,EAAE,GACtD,CAAA;KACH;AACH,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC;AAGtC,MAAM,UAAU,eAAe,CAAC,QAAwB;IACtD,OAAO,QAAQ,CAAC,IAAI,KAAK,UAAU;QAC/B,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,eAAe;YACjC,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,YAAY,CAAC;AACvB,CAAC","sourcesContent":["/** @jsx jsx */\n/** @jsxFrag React.Fragment */\n\n//import React from 'react';\nimport { type ItemRenderer } from '@blueprintjs/select';\nimport { jsx } from '@emotion/react';\nimport { type IconName, MenuItem } from '@blueprintjs/core';\nimport type {\n InternalItemReference,\n Payload,\n RegisterItem,\n} from '../types';\nimport type { ChangeProposal } from './types';\n\nimport ProposalSummary from './ProposalSummary';\nimport ProposalType from './ProposalType';\n\nexport interface ChangeProposalItem {\n itemPath: string\n itemRef: InternalItemReference\n proposal: ChangeProposal\n item: RegisterItem<Payload> | null\n itemBefore: RegisterItem<Payload> | undefined\n}\n\nexport const ChangeProposalItemView: ItemRenderer<ChangeProposalItem> =\n(item, { handleClick, modifiers, query }) => {\n if (item.item !== null) {\n const i = item as ChangeProposalItem & { item: RegisterItem<any> };\n return (\n <MenuItem\n active={modifiers.active}\n disabled={modifiers.disabled}\n labelElement={<ProposalType proposal={i.proposal} />}\n key={item.itemPath}\n onClick={handleClick}\n icon={getProposalIcon(item.proposal)}\n text={<ProposalSummary {...i} />} />\n );\n } else {\n return <MenuItem\n disabled\n icon=\"heart-broken\"\n onClick={handleClick}\n text={`Broken proposal entry at path ${item.itemPath}`}\n />\n }\n};\n\nexport default ChangeProposalItemView;\n\n\nexport function getProposalIcon(proposal: ChangeProposal): IconName {\n return proposal.type === 'addition'\n ? 'add'\n : proposal.type === 'clarification'\n ? 'edit'\n : 'ban-circle';\n}\n"]}
@@ -0,0 +1,6 @@
1
+ /** @jsx jsx */
2
+ /** @jsxFrag React.Fragment */
3
+ import React from 'react';
4
+ import type { ProposalProps, ChangeProposal } from './types';
5
+ export declare const ProposalSummary: React.FC<ProposalProps<ChangeProposal>>;
6
+ export default ProposalSummary;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.ProposalSummary = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var _react2 = require("@emotion/react");
11
+
12
+ var _ErrorState = _interopRequireDefault(require("@riboseinc/paneron-extension-kit/widgets/ErrorState"));
13
+
14
+ var _BrowserCtx = require("../views/BrowserCtx");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ /** @jsx jsx */
19
+
20
+ /** @jsxFrag React.Fragment */
21
+ const ProposalSummary = function ({
22
+ proposal,
23
+ itemRef,
24
+ item,
25
+ itemBefore,
26
+ onChange
27
+ }) {
28
+ var _a;
29
+
30
+ const {
31
+ itemClasses
32
+ } = (0, _react.useContext)(_BrowserCtx.BrowserCtx);
33
+ const {
34
+ classID
35
+ } = itemRef;
36
+ const cls = itemClasses[classID];
37
+ const ListItemView = (_a = cls === null || cls === void 0 ? void 0 : cls.views) === null || _a === void 0 ? void 0 : _a.listItemView;
38
+
39
+ if (ListItemView) {
40
+ return (0, _react2.jsx)("span", {
41
+ css: (0, _react2.css)`
42
+ display: inline-flex;
43
+ flex-flow: row nowrap;
44
+ align-items: baseline;
45
+ `
46
+ }, (0, _react2.jsx)(ListItemView, {
47
+ itemRef: itemRef,
48
+ itemData: item.data,
49
+ css: (0, _react2.css)`text-overflow: ellipsis; overflow: hidden;`
50
+ }), "\u2003", (0, _react2.jsx)("small", null, cls.meta.title));
51
+ } else {
52
+ return (0, _react2.jsx)(_ErrorState.default, {
53
+ viewName: "list item view",
54
+ inline: true,
55
+ error: "unable to load list item view"
56
+ });
57
+ }
58
+ };
59
+
60
+ exports.ProposalSummary = ProposalSummary;
61
+ var _default = ProposalSummary;
62
+ exports.default = _default;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProposalSummary.js","sourceRoot":"","sources":["../../src/proposals/ProposalSummary.tsx"],"names":[],"mappings":"AAAA,eAAe;AACf,8BAA8B;AAE9B,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,UAAU,MAAM,qDAAqD,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,MAAM,eAAe,GAC5B,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE;;IACzD,MAAM,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,MAAM,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,YAAY,GAAG,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,0CAAE,YAAY,CAAC;IAE9C,IAAI,YAAY,EAAE;QAChB,OAAO,cAAM,GAAG,EAAE,GAAG,CAAA;;;;KAIpB;YACC,IAAC,YAAY,IACX,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,IAAI,CAAC,IAAI,EACnB,GAAG,EAAE,GAAG,CAAA,4CAA4C,GACpD;;YAEF,mBAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAS,CAC1B,CAAC;KACT;SAAM;QACL,OAAO,IAAC,UAAU,IAChB,QAAQ,EAAC,gBAAgB,EACzB,MAAM,QACN,KAAK,EAAC,+BAA+B,GACrC,CAAC;KACJ;AACH,CAAC,CAAC;AAGF,eAAe,eAAe,CAAC","sourcesContent":["/** @jsx jsx */\n/** @jsxFrag React.Fragment */\n\nimport React, { useContext } from 'react';\nimport { jsx, css } from '@emotion/react';\nimport ErrorState from '@riboseinc/paneron-extension-kit/widgets/ErrorState';\n\nimport { BrowserCtx } from '../views/BrowserCtx';\nimport type { ProposalProps, ChangeProposal } from './types';\n\n\nexport const ProposalSummary: React.FC<ProposalProps<ChangeProposal>> =\nfunction ({ proposal, itemRef, item, itemBefore, onChange }) {\n const { itemClasses } = useContext(BrowserCtx);\n const { classID } = itemRef;\n const cls = itemClasses[classID];\n const ListItemView = cls?.views?.listItemView;\n\n if (ListItemView) {\n return <span css={css`\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: baseline;\n `}>\n <ListItemView\n itemRef={itemRef}\n itemData={item.data}\n css={css`text-overflow: ellipsis; overflow: hidden;`}\n />\n &emsp;\n <small>{cls.meta.title}</small>\n </span>;\n } else {\n return <ErrorState\n viewName=\"list item view\"\n inline\n error=\"unable to load list item view\"\n />;\n }\n};\n\n\nexport default ProposalSummary;\n"]}
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ /** @jsxFrag React.Fragment */
3
+ import { jsx } from '@emotion/react';
4
+ import { type TagProps } from '@blueprintjs/core';
5
+ import { type ChangeProposal } from './types';
6
+ /** Returns props for a Tag that classifies this proposal. */
7
+ export declare function proposalToTagProps(proposal: ChangeProposal): TagProps;
8
+ export declare function ProposalType({ proposal }: {
9
+ proposal: ChangeProposal;
10
+ }): jsx.JSX.Element;
11
+ export default ProposalType;