@smartsoft001/pro-claude-plugins 0.4.0 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartsoft001/pro-claude-plugins",
3
- "version": "0.4.0",
3
+ "version": "0.7.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow",
3
3
  "description": "Development flow skills for Linear-driven development workflow",
4
- "version": "0.0.1"
4
+ "version": "0.7.0"
5
5
  }
@@ -915,6 +915,7 @@ When verification fails, delegate to appropriate fix agent:
915
915
  19. **Capture before screenshots in background**: Launch `screenshot-reporter` agent with `run_in_background: true` BEFORE implementing UI changes to capture "before" state while implementation proceeds
916
916
  20. **Capture after screenshots + post to Linear**: After implementation, launch `screenshot-reporter` agent to capture "after" screenshots, generate comparison report, post to Linear, and cleanup
917
917
  21. **Document translations changes**: If `apps/web/public/translations.json` was modified, include a table with added/changed translation keys and their PL/EN values in the Implementation Report
918
+ 21a. **⚠️ MANDATORY: Translation completeness before completion**: No hardcoded UI strings — every static label, heading, button, aria-label, meta/SEO text goes through a translation key. Before marking a subtask complete, verify that EVERY key referenced in the changed templates/TS exists in `apps/web/public/translations.json` in BOTH `pl` and `en` (a raw `GROUP.key` rendered in the UI is a defect), and that the touched groups are complete against the design/mockup — every visible text on the mockup has its key. When a reference project is available, diff the touched groups against it and fill the gaps
918
919
  22. **Capture screenshots in both modes**: Agent captures screenshots in BOTH normal mode and dark mode (high contrast) for complete visual documentation
919
920
  23. **Ask before collecting feedback for agent evolution**: When user provides corrections or suggestions during implementation, **explicitly ask** if they want to create a Linear issue for the improvement. Only user-confirmed feedback (answered "Yes") should be processed at evolution checkpoints (Step 3g-evolve, Step 4a) via `shared-agent-evolver` agent.
920
921
  24. **Never modify agent files directly during implementation**: The `shared-agent-evolver` agent files all proposals as Linear issues for manual review — it does NOT modify agent, command, or skill files directly.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-external",
3
3
  "description": "Development flow skills for standalone Angular 6-11 projects without framework (Angular CLI, Karma/Jasmine, Bootstrap 4)",
4
- "version": "0.0.1"
4
+ "version": "0.7.0"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "flow-legacy",
3
3
  "description": "Development flow skills for legacy Angular 14 projects with Linear-driven workflow",
4
- "version": "0.0.1"
4
+ "version": "0.7.0"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "smart-pro",
3
3
  "description": "Smart-pro integration - safety validation, audit logging, and auto-formatting hooks",
4
- "version": "0.0.1"
4
+ "version": "0.7.0"
5
5
  }
@@ -0,0 +1,236 @@
1
+ ---
2
+ name: angular-components-crud
3
+ description: Pro CRUD shell for @smartsoft001/pro-crud-shell-angular — ProCrudModule.forFeature wiring, 6 smartpro-* components with inputs/selectors, DYNAMIC_COMPONENTS_STORE override mechanism, cssClass/variant styling surface, known routed-wrapper projection limitation, and [class]-not-[class.smart:X] Tailwind rule.
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Pro CRUD Shell (`@smartsoft001/pro-crud-shell-angular`)
8
+
9
+ This package is the pro UI tier of the CRUD engine. It inherits all logic from
10
+ `@smartsoft001/crud-shell-angular` (config-driven routing, NgRx facades,
11
+ filter/sort/export/multiselect) and replaces the rendering layer with
12
+ `smartpro-*` components styled with the `smart:` Tailwind prefix.
13
+
14
+ ## When to Use This Skill
15
+
16
+ - Developer wants to wire a CRUD feature with pro Tailwind UI → show `ProCrudModule.forFeature` setup
17
+ - Developer asks which pro CRUD components exist → show the component table below
18
+ - Developer asks how the engine selects the pro page over the free one → explain `DYNAMIC_COMPONENTS_STORE`
19
+ - Developer asks how to style the CRUD pages → show `cssClass` / `variant` on `CrudFullConfig`
20
+ - Developer gets a blank page despite the override being registered → point to the known routed-wrapper limitation
21
+ - Developer tries to use `[class.smart:X]` → apply the Tailwind rule
22
+
23
+ ## Module Setup
24
+
25
+ ### `ProCrudModule.forFeature`
26
+
27
+ ```typescript
28
+ import { NgModule } from '@angular/core';
29
+ import { ProCrudModule } from '@smartsoft001/pro-crud-shell-angular';
30
+
31
+ @NgModule({
32
+ imports: [
33
+ ProCrudModule.forFeature({
34
+ routing: true, // true -> ProCrudModule (routed pages); false -> ProCrudCoreModule (no routes)
35
+ config: userConfig, // CrudFullConfig<T>
36
+ // socket: true, // opt-in realtime provider (inert stub today)
37
+ }),
38
+ ],
39
+ })
40
+ export class UserModule {}
41
+ ```
42
+
43
+ `forFeature` delegates to the engine's `CrudModule.forFeature` for all engine
44
+ providers, then additionally provides `ProCrudListPageComponent` and
45
+ `ProCrudItemPageComponent` into `DYNAMIC_COMPONENTS_STORE`.
46
+
47
+ ### `ProCrudCoreModule`
48
+
49
+ When `routing: false`, `forFeature` returns `ProCrudCoreModule`, which wraps
50
+ the engine's `CrudCoreModule` (logic without routed pages). Use this when you
51
+ manage routing yourself or compose the pro components manually.
52
+
53
+ ## CrudFullConfig — Relevant Fields
54
+
55
+ Declare `CrudFullConfig<T>` from `@smartsoft001/crud-shell-angular`. The fields
56
+ below are the ones the pro layer reads directly; the full reference is in the
57
+ engine's README.
58
+
59
+ ```typescript
60
+ import { CrudFullConfig } from '@smartsoft001/crud-shell-angular';
61
+ import { ListMode, PaginationMode } from '@smartsoft001/angular';
62
+
63
+ export const userConfig: CrudFullConfig<User> = {
64
+ apiUrl: 'https://api.example.com',
65
+ entity: 'user',
66
+ type: User,
67
+
68
+ title: 'Users',
69
+ details: true,
70
+ edit: true,
71
+ add: true,
72
+ remove: true,
73
+ search: true,
74
+ export: true,
75
+ pagination: { limit: 25 },
76
+ sort: { default: 'lastName', defaultDesc: false },
77
+ list: {
78
+ mode: ListMode.desktop,
79
+ paginationMode: PaginationMode.singlePage,
80
+ groups: [], // optional — activates the group accordion
81
+ },
82
+ inputComponents: {}, // per-field input overrides keyed by field name
83
+
84
+ // Pro styling surface (tier 2)
85
+ cssClass: 'smart:bg-gray-50', // forwarded as [class] to page host
86
+ variant: 'with-actions', // picks the smartpro-page-* variant
87
+ };
88
+ ```
89
+
90
+ ## DYNAMIC_COMPONENTS_STORE Override Mechanism
91
+
92
+ The engine resolves `'crud-list-page'` and `'crud-item-page'` dynamic slots
93
+ against `DYNAMIC_COMPONENTS_STORE`. Each pro page component carries a static
94
+ `smartType` field that matches those keys:
95
+
96
+ ```typescript
97
+ // Pro list page
98
+ ProCrudListPageComponent.smartType = 'crud-list-page';
99
+
100
+ // Pro item page
101
+ ProCrudItemPageComponent.smartType = 'crud-item-page';
102
+ ```
103
+
104
+ `ProCrudModule.forFeature` registers both into the token:
105
+
106
+ ```typescript
107
+ {
108
+ provide: DYNAMIC_COMPONENTS_STORE,
109
+ useValue: [ProCrudListPageComponent, ProCrudItemPageComponent],
110
+ }
111
+ ```
112
+
113
+ The engine's dynamic-component resolver checks `DYNAMIC_COMPONENTS_STORE` first
114
+ and selects the pro variant over the free standard variant for those two slots.
115
+
116
+ ## Component Reference
117
+
118
+ All six components are `ChangeDetectionStrategy.OnPush` and extend an engine
119
+ base class that provides all facade wiring.
120
+
121
+ | Selector | Class | Extends | Purpose |
122
+ | --------------------------- | ----------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
+ | `smartpro-crud-list-page` | `ProCrudListPageComponent` | `CrudListPageBaseComponent` | List page: `smart-crud-filters-config` + `smartpro-list`; shows group accordion when `config.list.groups` is set; hides flat list during search |
124
+ | `smartpro-crud-item-page` | `ProCrudItemPageComponent` | `CrudItemPageBaseComponent` | Item page: `smartpro-details` in details mode; `smart-form` with `config.inputComponents` in add/update mode |
125
+ | `smartpro-crud-filters` | `ProCrudFiltersComponent` | `FiltersBaseComponent` | Filters panel: Tailwind header with close button; individual filter controls via engine `smart-crud-filter` |
126
+ | `smartpro-crud-group` | `ProCrudGroupComponent` | `GroupBaseComponent` | Group accordion: accessible `button`/region with `aria-expanded`, rotating chevron; recursive child group support; embeds `smartpro-list` for leaf groups |
127
+ | `smartpro-crud-multiselect` | `ProCrudMultiselectComponent` | `MultiselectBaseComponent` | Multiselect panel: count header with close; optional `config.list.components.multi` outlet; multi-update `smart-form` + `smartpro-button` submit |
128
+ | `smartpro-crud-export` | `ProCrudExportComponent` | `ExportBaseComponent` | Export popover: CSV and XLSX triggers via `smartpro-button`; `config.cssClass` forwarded to wrapper |
129
+
130
+ ### Key inputs (inherited from engine base classes)
131
+
132
+ | Component | Signal/Input | Source | Description |
133
+ | --------------------------- | ---------------------------------------------------- | --------------------------- | -------------------------------------------------------------------- |
134
+ | `smartpro-crud-list-page` | `listOptions()` | `CrudListPageBaseComponent` | `IListOptionsPro<T>` fed to `smartpro-list` |
135
+ | `smartpro-crud-list-page` | `config` | `inject(CrudFullConfig)` | Full config (groups, cssClass, variant) |
136
+ | `smartpro-crud-item-page` | `mode()` | `CrudItemPageBaseComponent` | `'details' \| 'add' \| 'update'` |
137
+ | `smartpro-crud-item-page` | `detailsOptions()` | `CrudItemPageBaseComponent` | Options fed to `smartpro-details` |
138
+ | `smartpro-crud-item-page` | `selected()` | `CrudItemPageBaseComponent` | Current entity fed to `smart-form` |
139
+ | `smartpro-crud-filters` | `list()` | `FiltersBaseComponent` | Array of filter items; each rendered by `smart-crud-filter` |
140
+ | `smartpro-crud-filters` | `hideMenu()` | `FiltersBaseComponent` | Hides the header row when `true` |
141
+ | `smartpro-crud-group` | `groups()` | `GroupBaseComponent` | Array of group nodes with `key`, `text`, `show`, optional `children` |
142
+ | `smartpro-crud-group` | `listOptions()` | `GroupBaseComponent` | `IListOptionsPro<T>` for leaf group `smartpro-list` |
143
+ | `smartpro-crud-multiselect` | `list()` | `MultiselectBaseComponent` | Array of selected entities |
144
+ | `smartpro-crud-export` | `buttonExportCsvOptions` / `buttonExportXlsxOptions` | `ExportBaseComponent` | `IButtonOptions` for each trigger |
145
+
146
+ ## Styling Rules
147
+
148
+ ### Tier-2 surface: `cssClass` and `variant`
149
+
150
+ ```typescript
151
+ // In CrudFullConfig
152
+ cssClass: 'smart:bg-gray-50 smart:rounded-xl',
153
+ variant: 'with-actions', // any SmartPageVariant from @smartsoft001/pro-angular
154
+ ```
155
+
156
+ - `cssClass` is bound as `[class]` on the page host element of the list and item pages, and on the export wrapper.
157
+ - `variant` is threaded into `pageOptions().variant`, which `SmartProComponentsModule` resolves to the matching `smartpro-page-*` component via `PAGE_VARIANT_COMPONENTS_TOKEN`.
158
+
159
+ ### Tailwind `smart:` prefix — no `[class.smart:X]` shorthand
160
+
161
+ Angular's `[class.X]` shorthand treats the full string `smart:X` as the class
162
+ name, which breaks the Tailwind `smart:` prefix during JIT purging.
163
+
164
+ ```html
165
+ <!-- WRONG -->
166
+ <div [class.smart:font-semibold]="isActive"></div>
167
+
168
+ <!-- CORRECT -->
169
+ <div [class]="isActive ? 'smart:font-semibold' : ''"></div>
170
+ ```
171
+
172
+ All pro CRUD components follow this rule. Enforce it in any customization.
173
+
174
+ ## Known Limitation — Routed Wrappers Do Not Project the Pro Page
175
+
176
+ The engine's free routed wrappers (`smart-crud-list-page` /
177
+ `smart-crud-item-page`) use `CreateDynamicComponent` to mount the override
178
+ found in `DYNAMIC_COMPONENTS_STORE`. The wrapper templates currently do not
179
+ include `DynamicContentDirective` in their `imports` array, so the pro component
180
+ is instantiated but not inserted into the DOM — the page renders blank.
181
+
182
+ **This is an engine-side fix pending in `@smartsoft001/crud-shell-angular`.**
183
+
184
+ Until the fix lands, mount the pro pages directly instead of relying on the
185
+ routed wrappers:
186
+
187
+ ```html
188
+ <smartpro-crud-list-page></smartpro-crud-list-page>
189
+ <smartpro-crud-item-page></smartpro-crud-item-page>
190
+ ```
191
+
192
+ Or compose the components manually inside your own page shell.
193
+
194
+ ## Usage Example
195
+
196
+ ```typescript
197
+ // user.module.ts
198
+ import { NgModule } from '@angular/core';
199
+ import { ProCrudModule } from '@smartsoft001/pro-crud-shell-angular';
200
+ import { userConfig } from './user.config';
201
+
202
+ @NgModule({
203
+ imports: [ProCrudModule.forFeature({ routing: true, config: userConfig })],
204
+ })
205
+ export class UserModule {}
206
+ ```
207
+
208
+ ```html
209
+ <!-- user-list.page.html — direct mount (recommended until engine fix) -->
210
+ <smartpro-crud-list-page></smartpro-crud-list-page>
211
+ ```
212
+
213
+ ```html
214
+ <!-- user-item.page.html -->
215
+ <smartpro-crud-item-page></smartpro-crud-item-page>
216
+ ```
217
+
218
+ Compositional use — embed only the filters panel in a custom page shell:
219
+
220
+ ```html
221
+ <aside class="smart:w-72">
222
+ <smartpro-crud-filters></smartpro-crud-filters>
223
+ </aside>
224
+ <main>
225
+ <!-- your own content -->
226
+ </main>
227
+ ```
228
+
229
+ ## File Locations
230
+
231
+ - Package: `packages/crud/shell/pro-angular/`
232
+ - Module: `packages/crud/shell/pro-angular/src/lib/pro-crud.module.ts`
233
+ - Pages: `packages/crud/shell/pro-angular/src/lib/pages/{list,item}/`
234
+ - Components: `packages/crud/shell/pro-angular/src/lib/components/{filters,group,multiselect,export}/`
235
+ - Barrel: `packages/crud/shell/pro-angular/src/index.ts`
236
+ - README: `packages/crud/shell/pro-angular/README.md`