@weaver-apps/service-desk 0.1.2 → 0.2.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/README.md CHANGED
@@ -7,10 +7,15 @@ gateway the host supplies, and holds no key.
7
7
  ## Compose it
8
8
 
9
9
  ```ts
10
- import { createServiceDeskPlugin, createHttpServiceDeskGateway, provideServiceDeskGateway } from '@weaver-apps/service-desk';
11
-
12
- provideTranslationNamespaces('service-desk'),
13
- provideCapabilityGrants({ 'service-desk': ['contributions', 'navigation', 'ui'] }),
10
+ import {
11
+ createHttpServiceDeskGateway,
12
+ createServiceDeskPlugin,
13
+ provideServiceDeskGateway,
14
+ serviceDeskPluginId,
15
+ } from '@weaver-apps/service-desk';
16
+
17
+ provideTranslationNamespaces(serviceDeskPluginId),
18
+ provideCapabilityGrants({ [serviceDeskPluginId]: ['contributions', 'navigation', 'ui'] }),
14
19
  ...providePlugins(createServiceDeskPlugin({ railItem: true })),
15
20
  provideServiceDeskGateway(createHttpServiceDeskGateway({ baseUrl: '/weaver-apps' })),
16
21
  ```
@@ -18,15 +23,38 @@ provideServiceDeskGateway(createHttpServiceDeskGateway({ baseUrl: '/weaver-apps'
18
23
  - `baseUrl` is a same-origin path the host's backend forwards to the server with the forwarding key and the
19
24
  signed-in person's tenant. The gateway appends the server's routes, such as
20
25
  `/service-desk/desks/{id}/requests`.
21
- - Serve the translations: copy `node_modules/@weaver-apps/service-desk/i18n/service-desk` to
22
- `i18n/service-desk`.
23
- - If the host compiles the shell's theme with Tailwind, add the package as an `@source`.
24
-
25
- ## Surfaces
26
-
27
- | Path | What it shows |
28
- |---|---|
29
- | `service-desk` | the tenant's desks |
30
- | `service-desk/:deskId` | one desk's requests, filtered and paged |
31
-
32
- `deskPath(id)` builds the second; a host that shows one entry per desk navigates there.
26
+ - Serve the translations: copy `node_modules/@weaver-apps/service-desk/i18n/weaver-apps-service-desk` to
27
+ `i18n/weaver-apps-service-desk`.
28
+ - Install AG Grid, a peer dependency the list is drawn with: `npm i ag-grid-community@^36.2 ag-grid-angular@^36.2
29
+ @ag-grid-community/locale@^36.2`. `@weaver-apps/data-grid`, the grid both Weaver Apps weavers share, comes along as a
30
+ dependency; the host composes nothing for it.
31
+ - If the host compiles the shell's theme with Tailwind, add the package and `@weaver-apps/data-grid` as an `@source`.
32
+
33
+ ## Names in the host
34
+
35
+ The plugin id is `weaver-apps-service-desk` (`serviceDeskPluginId`). Every id the plugin registers and every
36
+ icon it contributes starts with `weaver-apps-service-desk.`, its routes live under
37
+ `weaver-apps-service-desk/`, and its translations are the namespace `weaver-apps-service-desk`. The ids are
38
+ exported as `serviceDeskContributionIds`.
39
+
40
+ | Id | Path | What it shows |
41
+ |---|---|---|
42
+ | `weaver-apps-service-desk.desks` | `weaver-apps-service-desk` | the tenant's desks |
43
+ | `weaver-apps-service-desk.desk` | `weaver-apps-service-desk/:deskId` | one desk's requests, filtered and paged |
44
+ | `weaver-apps-service-desk.rail` | | the rail item, only with `railItem: true` |
45
+
46
+ A desk's requests are a grid that loads more as the person scrolls and shows how many match. A click on the
47
+ title, priority, status, raised or due header sorts them on the server (newest first by default); title and
48
+ description, the contact, and type, status and priority filter per column, the last three by any number of values.
49
+ By default the status filter holds open, in progress and completed.
50
+
51
+ `deskPath(id)` builds the address of one desk; a host that shows one entry per desk navigates there.
52
+
53
+ ## Moving from 0.1.x
54
+
55
+ 0.2.0 draws the list with AG Grid, so a host installs it (see above). It also renamed everything the plugin puts
56
+ into a host; a host composing it changes three places: the key of
57
+ its capability grant (`service-desk` becomes `weaver-apps-service-desk`), the translation namespace it
58
+ declares, and the folder it serves the translations from (`i18n/service-desk` becomes
59
+ `i18n/weaver-apps-service-desk`). Addresses saved under `service-desk/...` no longer resolve; build them with
60
+ `deskPath`.