@contractspec/example.crm-pipeline 3.7.5 → 3.7.7

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 (106) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/AGENTS.md +51 -33
  3. package/CHANGELOG.md +16 -0
  4. package/README.md +66 -148
  5. package/dist/browser/events/contact.event.js +1 -1
  6. package/dist/browser/events/deal.event.js +1 -1
  7. package/dist/browser/events/index.js +3 -3
  8. package/dist/browser/events/task.event.js +1 -1
  9. package/dist/browser/index.js +293 -293
  10. package/dist/browser/ui/CrmDashboard.js +221 -221
  11. package/dist/browser/ui/CrmDealCard.js +5 -5
  12. package/dist/browser/ui/CrmPipelineBoard.js +13 -13
  13. package/dist/browser/ui/hooks/index.js +2 -2
  14. package/dist/browser/ui/hooks/useDealList.js +1 -1
  15. package/dist/browser/ui/hooks/useDealMutations.js +1 -1
  16. package/dist/browser/ui/index.js +290 -290
  17. package/dist/browser/ui/modals/CreateDealModal.js +12 -12
  18. package/dist/browser/ui/modals/DealActionsModal.js +21 -21
  19. package/dist/browser/ui/modals/index.js +33 -33
  20. package/dist/browser/ui/renderers/index.js +116 -116
  21. package/dist/browser/ui/renderers/pipeline.renderer.js +97 -97
  22. package/dist/deal/index.d.ts +2 -2
  23. package/dist/events/contact.event.js +1 -1
  24. package/dist/events/deal.event.js +1 -1
  25. package/dist/events/index.js +3 -3
  26. package/dist/events/task.event.js +1 -1
  27. package/dist/handlers/index.d.ts +2 -2
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +293 -293
  30. package/dist/node/events/contact.event.js +1 -1
  31. package/dist/node/events/deal.event.js +1 -1
  32. package/dist/node/events/index.js +3 -3
  33. package/dist/node/events/task.event.js +1 -1
  34. package/dist/node/index.js +293 -293
  35. package/dist/node/ui/CrmDashboard.js +221 -221
  36. package/dist/node/ui/CrmDealCard.js +5 -5
  37. package/dist/node/ui/CrmPipelineBoard.js +13 -13
  38. package/dist/node/ui/hooks/index.js +2 -2
  39. package/dist/node/ui/hooks/useDealList.js +1 -1
  40. package/dist/node/ui/hooks/useDealMutations.js +1 -1
  41. package/dist/node/ui/index.js +290 -290
  42. package/dist/node/ui/modals/CreateDealModal.js +12 -12
  43. package/dist/node/ui/modals/DealActionsModal.js +21 -21
  44. package/dist/node/ui/modals/index.js +33 -33
  45. package/dist/node/ui/renderers/index.js +116 -116
  46. package/dist/node/ui/renderers/pipeline.renderer.js +97 -97
  47. package/dist/operations/index.d.ts +1 -1
  48. package/dist/ui/CrmDashboard.js +221 -221
  49. package/dist/ui/CrmDealCard.js +5 -5
  50. package/dist/ui/CrmPipelineBoard.js +13 -13
  51. package/dist/ui/hooks/index.d.ts +2 -2
  52. package/dist/ui/hooks/index.js +2 -2
  53. package/dist/ui/hooks/useDealList.js +1 -1
  54. package/dist/ui/hooks/useDealMutations.d.ts +9 -0
  55. package/dist/ui/hooks/useDealMutations.js +1 -1
  56. package/dist/ui/index.d.ts +3 -3
  57. package/dist/ui/index.js +290 -290
  58. package/dist/ui/modals/CreateDealModal.js +12 -12
  59. package/dist/ui/modals/DealActionsModal.js +21 -21
  60. package/dist/ui/modals/index.js +33 -33
  61. package/dist/ui/renderers/index.d.ts +1 -1
  62. package/dist/ui/renderers/index.js +116 -116
  63. package/dist/ui/renderers/pipeline.renderer.d.ts +1 -1
  64. package/dist/ui/renderers/pipeline.renderer.js +97 -97
  65. package/package.json +14 -14
  66. package/src/crm-pipeline.feature.ts +86 -86
  67. package/src/deal/deal.enum.ts +8 -8
  68. package/src/deal/deal.operation.ts +255 -255
  69. package/src/deal/deal.schema.ts +92 -92
  70. package/src/deal/deal.test-spec.ts +48 -48
  71. package/src/deal/index.ts +17 -19
  72. package/src/docs/crm-pipeline.docblock.ts +43 -43
  73. package/src/entities/company.entity.ts +52 -52
  74. package/src/entities/contact.entity.ts +67 -67
  75. package/src/entities/deal.entity.ts +134 -134
  76. package/src/entities/index.ts +27 -27
  77. package/src/entities/task.entity.ts +105 -105
  78. package/src/events/contact.event.ts +22 -22
  79. package/src/events/deal.event.ts +77 -77
  80. package/src/events/task.event.ts +19 -19
  81. package/src/example.ts +32 -32
  82. package/src/handlers/crm.handlers.ts +358 -357
  83. package/src/handlers/deal.handlers.ts +179 -179
  84. package/src/handlers/index.ts +18 -19
  85. package/src/handlers/mock-data.ts +167 -167
  86. package/src/index.ts +11 -11
  87. package/src/operations/index.ts +16 -16
  88. package/src/presentations/dashboard.presentation.ts +45 -45
  89. package/src/presentations/pipeline.presentation.ts +90 -90
  90. package/src/seeders/index.ts +26 -26
  91. package/src/shared/overlay-types.ts +23 -23
  92. package/src/ui/CrmDashboard.tsx +256 -256
  93. package/src/ui/CrmDealCard.tsx +64 -64
  94. package/src/ui/CrmPipelineBoard.tsx +105 -105
  95. package/src/ui/hooks/index.ts +3 -3
  96. package/src/ui/hooks/useDealList.ts +85 -85
  97. package/src/ui/hooks/useDealMutations.ts +151 -150
  98. package/src/ui/index.ts +5 -10
  99. package/src/ui/modals/CreateDealModal.tsx +217 -217
  100. package/src/ui/modals/DealActionsModal.tsx +390 -390
  101. package/src/ui/overlays/demo-overlays.ts +43 -43
  102. package/src/ui/renderers/index.ts +4 -3
  103. package/src/ui/renderers/pipeline.markdown.ts +165 -165
  104. package/src/ui/renderers/pipeline.renderer.tsx +17 -16
  105. package/tsconfig.json +7 -8
  106. package/tsdown.config.js +7 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.crm-pipeline",
3
- "version": "3.7.5",
3
+ "version": "3.7.7",
4
4
  "description": "CRM Pipeline - Contacts, Companies, Deals, Tasks",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -323,32 +323,32 @@
323
323
  "dev": "contractspec-bun-build dev",
324
324
  "clean": "rimraf dist .turbo",
325
325
  "lint": "bun lint:fix",
326
- "lint:fix": "eslint src --fix",
327
- "lint:check": "eslint src",
326
+ "lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
327
+ "lint:check": "biome check .",
328
328
  "test": "bun test --pass-with-no-tests",
329
329
  "validate": "contractspec validate \"src/**/*\"",
330
330
  "prebuild": "contractspec-bun-build prebuild",
331
331
  "typecheck": "tsc --noEmit"
332
332
  },
333
333
  "dependencies": {
334
- "@contractspec/lib.contracts-spec": "3.7.5",
335
- "@contractspec/lib.design-system": "3.7.5",
336
- "@contractspec/lib.example-shared-ui": "6.0.5",
337
- "@contractspec/lib.identity-rbac": "3.7.5",
338
- "@contractspec/lib.runtime-sandbox": "2.7.5",
339
- "@contractspec/lib.schema": "3.7.5",
340
- "@contractspec/lib.ui-kit-web": "3.7.5",
341
- "@contractspec/module.audit-trail": "3.7.5",
342
- "@contractspec/module.notifications": "3.7.5",
334
+ "@contractspec/lib.contracts-spec": "4.0.0",
335
+ "@contractspec/lib.design-system": "3.8.0",
336
+ "@contractspec/lib.example-shared-ui": "6.0.7",
337
+ "@contractspec/lib.identity-rbac": "3.7.7",
338
+ "@contractspec/lib.runtime-sandbox": "2.7.6",
339
+ "@contractspec/lib.schema": "3.7.6",
340
+ "@contractspec/lib.ui-kit-web": "3.8.0",
341
+ "@contractspec/module.audit-trail": "3.7.7",
342
+ "@contractspec/module.notifications": "3.7.7",
343
343
  "react": "19.2.0",
344
344
  "react-dom": "19.2.0"
345
345
  },
346
346
  "devDependencies": {
347
- "@contractspec/tool.typescript": "3.7.5",
347
+ "@contractspec/tool.typescript": "3.7.6",
348
348
  "typescript": "^5.9.3",
349
349
  "@types/react": "^19.2.14",
350
350
  "@types/react-dom": "^19.2.2",
351
- "@contractspec/tool.bun": "3.7.5"
351
+ "@contractspec/tool.bun": "3.7.6"
352
352
  },
353
353
  "publishConfig": {
354
354
  "exports": {
@@ -10,100 +10,100 @@ import { defineFeature } from '@contractspec/lib.contracts-spec';
10
10
  * pipeline operations, and contact management into an installable feature.
11
11
  */
12
12
  export const CrmPipelineFeature = defineFeature({
13
- meta: {
14
- key: 'crm-pipeline',
15
- title: 'CRM Pipeline',
16
- description:
17
- 'CRM and sales pipeline management with deals, contacts, and companies',
18
- domain: 'crm',
19
- owners: ['@crm-team'],
20
- tags: ['crm', 'sales', 'pipeline', 'deals'],
21
- stability: 'experimental',
22
- version: '1.0.0',
23
- },
13
+ meta: {
14
+ key: 'crm-pipeline',
15
+ title: 'CRM Pipeline',
16
+ description:
17
+ 'CRM and sales pipeline management with deals, contacts, and companies',
18
+ domain: 'crm',
19
+ owners: ['@crm-team'],
20
+ tags: ['crm', 'sales', 'pipeline', 'deals'],
21
+ stability: 'experimental',
22
+ version: '1.0.0',
23
+ },
24
24
 
25
- // All contract operations included in this feature
26
- operations: [
27
- // Deal operations
28
- { key: 'crm.deal.create', version: '1.0.0' },
29
- { key: 'crm.deal.move', version: '1.0.0' },
30
- { key: 'crm.deal.win', version: '1.0.0' },
31
- { key: 'crm.deal.lose', version: '1.0.0' },
32
- { key: 'crm.deal.list', version: '1.0.0' },
33
- ],
25
+ // All contract operations included in this feature
26
+ operations: [
27
+ // Deal operations
28
+ { key: 'crm.deal.create', version: '1.0.0' },
29
+ { key: 'crm.deal.move', version: '1.0.0' },
30
+ { key: 'crm.deal.win', version: '1.0.0' },
31
+ { key: 'crm.deal.lose', version: '1.0.0' },
32
+ { key: 'crm.deal.list', version: '1.0.0' },
33
+ ],
34
34
 
35
- // Events emitted by this feature
36
- events: [
37
- // Deal events
38
- { key: 'deal.created', version: '1.0.0' },
39
- { key: 'deal.moved', version: '1.0.0' },
40
- { key: 'deal.won', version: '1.0.0' },
41
- { key: 'deal.lost', version: '1.0.0' },
35
+ // Events emitted by this feature
36
+ events: [
37
+ // Deal events
38
+ { key: 'deal.created', version: '1.0.0' },
39
+ { key: 'deal.moved', version: '1.0.0' },
40
+ { key: 'deal.won', version: '1.0.0' },
41
+ { key: 'deal.lost', version: '1.0.0' },
42
42
 
43
- // Contact events
44
- { key: 'contact.created', version: '1.0.0' },
43
+ // Contact events
44
+ { key: 'contact.created', version: '1.0.0' },
45
45
 
46
- // Task events
47
- { key: 'task.completed', version: '1.0.0' },
48
- ],
46
+ // Task events
47
+ { key: 'task.completed', version: '1.0.0' },
48
+ ],
49
49
 
50
- // Presentations associated with this feature
51
- presentations: [
52
- { key: 'crm.dashboard', version: '1.0.0' },
53
- { key: 'crm.pipeline.kanban', version: '1.0.0' },
54
- { key: 'crm.deal.viewList', version: '1.0.0' },
55
- { key: 'crm.deal.detail', version: '1.0.0' },
56
- { key: 'crm.deal.card', version: '1.0.0' },
57
- { key: 'crm.pipeline.metrics', version: '1.0.0' },
58
- ],
50
+ // Presentations associated with this feature
51
+ presentations: [
52
+ { key: 'crm.dashboard', version: '1.0.0' },
53
+ { key: 'crm.pipeline.kanban', version: '1.0.0' },
54
+ { key: 'crm.deal.viewList', version: '1.0.0' },
55
+ { key: 'crm.deal.detail', version: '1.0.0' },
56
+ { key: 'crm.deal.card', version: '1.0.0' },
57
+ { key: 'crm.pipeline.metrics', version: '1.0.0' },
58
+ ],
59
59
 
60
- // Link operations to their primary presentations
61
- opToPresentation: [
62
- {
63
- op: { key: 'crm.deal.list', version: '1.0.0' },
64
- pres: { key: 'crm.pipeline.kanban', version: '1.0.0' },
65
- },
66
- {
67
- op: { key: 'crm.deal.move', version: '1.0.0' },
68
- pres: { key: 'crm.pipeline.kanban', version: '1.0.0' },
69
- },
70
- ],
60
+ // Link operations to their primary presentations
61
+ opToPresentation: [
62
+ {
63
+ op: { key: 'crm.deal.list', version: '1.0.0' },
64
+ pres: { key: 'crm.pipeline.kanban', version: '1.0.0' },
65
+ },
66
+ {
67
+ op: { key: 'crm.deal.move', version: '1.0.0' },
68
+ pres: { key: 'crm.pipeline.kanban', version: '1.0.0' },
69
+ },
70
+ ],
71
71
 
72
- // Target requirements for multi-surface rendering
73
- presentationsTargets: [
74
- { key: 'crm.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },
75
- {
76
- key: 'crm.pipeline.kanban',
77
- version: '1.0.0',
78
- targets: ['react', 'markdown'],
79
- },
80
- {
81
- key: 'crm.deal.viewList',
82
- version: '1.0.0',
83
- targets: ['react', 'markdown', 'application/json'],
84
- },
85
- {
86
- key: 'crm.pipeline.metrics',
87
- version: '1.0.0',
88
- targets: ['react', 'markdown'],
89
- },
90
- ],
72
+ // Target requirements for multi-surface rendering
73
+ presentationsTargets: [
74
+ { key: 'crm.dashboard', version: '1.0.0', targets: ['react', 'markdown'] },
75
+ {
76
+ key: 'crm.pipeline.kanban',
77
+ version: '1.0.0',
78
+ targets: ['react', 'markdown'],
79
+ },
80
+ {
81
+ key: 'crm.deal.viewList',
82
+ version: '1.0.0',
83
+ targets: ['react', 'markdown', 'application/json'],
84
+ },
85
+ {
86
+ key: 'crm.pipeline.metrics',
87
+ version: '1.0.0',
88
+ targets: ['react', 'markdown'],
89
+ },
90
+ ],
91
91
 
92
- // Capability requirements
93
- capabilities: {
94
- requires: [
95
- { key: 'identity', version: '1.0.0' },
96
- { key: 'audit-trail', version: '1.0.0' },
97
- { key: 'notifications', version: '1.0.0' },
98
- ],
99
- },
92
+ // Capability requirements
93
+ capabilities: {
94
+ requires: [
95
+ { key: 'identity', version: '1.0.0' },
96
+ { key: 'audit-trail', version: '1.0.0' },
97
+ { key: 'notifications', version: '1.0.0' },
98
+ ],
99
+ },
100
100
 
101
- telemetry: [{ key: 'crm-pipeline.telemetry', version: '1.0.0' }],
101
+ telemetry: [{ key: 'crm-pipeline.telemetry', version: '1.0.0' }],
102
102
 
103
- docs: [
104
- 'docs.examples.crm-pipeline.goal',
105
- 'docs.examples.crm-pipeline.usage',
106
- 'docs.examples.crm-pipeline.reference',
107
- 'docs.examples.crm-pipeline.constraints',
108
- ],
103
+ docs: [
104
+ 'docs.examples.crm-pipeline.goal',
105
+ 'docs.examples.crm-pipeline.usage',
106
+ 'docs.examples.crm-pipeline.reference',
107
+ 'docs.examples.crm-pipeline.constraints',
108
+ ],
109
109
  });
@@ -4,18 +4,18 @@ import { defineEnum } from '@contractspec/lib.schema';
4
4
  * Deal status enum.
5
5
  */
6
6
  export const DealStatusEnum = defineEnum('DealStatus', [
7
- 'OPEN',
8
- 'WON',
9
- 'LOST',
10
- 'STALE',
7
+ 'OPEN',
8
+ 'WON',
9
+ 'LOST',
10
+ 'STALE',
11
11
  ]);
12
12
 
13
13
  /**
14
14
  * Deal status filter enum.
15
15
  */
16
16
  export const DealStatusFilterEnum = defineEnum('DealStatusFilter', [
17
- 'OPEN',
18
- 'WON',
19
- 'LOST',
20
- 'all',
17
+ 'OPEN',
18
+ 'WON',
19
+ 'LOST',
20
+ 'all',
21
21
  ]);