@vanillabp/bc-shared 0.1.0 → 0.1.4
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/components/DefaultListCell.d.ts +1 -2
- package/dist/components/DefaultListCell.js +1 -1
- package/dist/components/DefaultListHeader.d.ts +1 -1
- package/dist/components/UserDetailsBox.d.ts +1 -2
- package/dist/components/index.d.ts +1 -2
- package/dist/index.d.ts +1 -5
- package/dist/types/UserTaskForm.d.ts +1 -2
- package/dist/types/UserTaskListCell.d.ts +1 -3
- package/dist/types/WorkflowListCell.d.ts +1 -4
- package/dist/types/WorkflowPage.d.ts +1 -3
- package/dist/types/index.d.ts +1 -5
- package/dist/types/index.js +0 -5
- package/package.json +5 -4
- package/dist/types/BcUserTask.d.ts +0 -18
- package/dist/types/BcUserTask.js +0 -1
- package/dist/types/BcWorkflow.d.ts +0 -11
- package/dist/types/BcWorkflow.js +0 -1
- package/dist/types/BcWorkflowModule.d.ts +0 -30
- package/dist/types/BcWorkflowModule.js +0 -0
- package/dist/types/ListCell.d.ts +0 -41
- package/dist/types/ListCell.js +0 -14
- package/dist/types/translate.d.ts +0 -3
- package/dist/types/translate.js +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BoxExtendedProps, TextExtendedProps } from 'grommet';
|
|
2
2
|
import { ColorType, BackgroundType } from 'grommet/utils/index.js';
|
|
3
3
|
import React, { PropsWithChildren, FC } from 'react';
|
|
4
|
-
import { ListItem, Column, Person } from '
|
|
5
|
-
import { TranslationFunction } from '../types/translate.js';
|
|
4
|
+
import { ListItem, TranslationFunction, Column, Person } from '@vanillabp/bc-types';
|
|
6
5
|
|
|
7
6
|
declare const ENDED_FONT_COLOR_ODD = "#b4b4b4";
|
|
8
7
|
declare type Alignment = 'left' | 'center' | 'right';
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { Box, Text } from "grommet";
|
|
8
8
|
import { memo } from "react";
|
|
9
|
-
import { ListItemStatus } from "../types/index.js";
|
|
10
9
|
import {
|
|
11
10
|
getObjectProperty,
|
|
12
11
|
toLocaleDateString,
|
|
@@ -14,6 +13,7 @@ import {
|
|
|
14
13
|
toLocaleTimeStringWithoutSeconds
|
|
15
14
|
} from "../utils/index.js";
|
|
16
15
|
import { UserDetailsBox } from "./index.js";
|
|
16
|
+
import { ListItemStatus } from "@vanillabp/bc-types";
|
|
17
17
|
const DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
18
18
|
const ENDED_FONT_COLOR_ODD = "#b4b4b4";
|
|
19
19
|
const textColorAccordingToStatus = (item) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Person } from '@vanillabp/bc-official-gui-client';
|
|
2
|
-
import { Person as Person$1 } from '
|
|
3
|
-
import { TranslationFunction } from '../types/translate.js';
|
|
2
|
+
import { TranslationFunction, Person as Person$1 } from '@vanillabp/bc-types';
|
|
4
3
|
|
|
5
4
|
declare const UserDetailsBox: ({ t, user }: {
|
|
6
5
|
t: TranslationFunction;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,18 +22,14 @@ export { i18n } from './utils/i18n.js';
|
|
|
22
22
|
export { theme } from './theme/index.js';
|
|
23
23
|
export { UserTaskForm } from './types/UserTaskForm.js';
|
|
24
24
|
export { ColumnsOfUserTaskFunction, UserTaskListCell } from './types/UserTaskListCell.js';
|
|
25
|
-
export { Column, ListItem, ListItemStatus, Person } from './types/ListCell.js';
|
|
26
25
|
export { WorkflowPage } from './types/WorkflowPage.js';
|
|
27
26
|
export { ColumnsOfWorkflowFunction, WorkflowListCell } from './types/WorkflowListCell.js';
|
|
28
|
-
export { BcWorkflow, GetUserTasksFunction, NavigateToWorkflowFunction } from './types/BcWorkflow.js';
|
|
29
|
-
export { AssignFunction, BcUserTask, ClaimFunction, OpenUserTaskFunction, OpenWorkflowFunction, UnassignFunction, UnclaimFunction } from './types/BcUserTask.js';
|
|
30
|
-
export { BcWorkflowModule } from './types/BcWorkflowModule.js';
|
|
31
27
|
export { WorkflowModule, WorkflowModuleComponent, WorkflowModuleComponentProps } from './types/WorkflowModuleComponent.js';
|
|
32
|
-
export { TranslationFunction } from './types/translate.js';
|
|
33
28
|
import '@microsoft/fetch-event-source';
|
|
34
29
|
import 'react';
|
|
35
30
|
import 'grommet';
|
|
36
31
|
import 'grommet/utils';
|
|
37
32
|
import 'i18next';
|
|
38
33
|
import 'grommet/utils/index.js';
|
|
34
|
+
import '@vanillabp/bc-types';
|
|
39
35
|
import '@vanillabp/bc-official-gui-client';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { UserTask } from '@vanillabp/bc-official-gui-client';
|
|
3
|
-
import { BcUserTask } from './BcUserTask.js';
|
|
4
|
-
import { Column } from './ListCell.js';
|
|
5
3
|
import { DefaultListCellAwareProps } from '../components/DefaultListCell.js';
|
|
4
|
+
import { Column, BcUserTask } from '@vanillabp/bc-types';
|
|
6
5
|
import 'grommet';
|
|
7
6
|
import 'grommet/utils/index.js';
|
|
8
|
-
import './translate.js';
|
|
9
7
|
|
|
10
8
|
interface UserTaskListCellProps extends DefaultListCellAwareProps<BcUserTask> {
|
|
11
9
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Workflow } from '@vanillabp/bc-official-gui-client';
|
|
3
3
|
import { DefaultListCellAwareProps } from '../components/DefaultListCell.js';
|
|
4
|
-
import { Column } from '
|
|
5
|
-
import { BcWorkflow } from './BcWorkflow.js';
|
|
4
|
+
import { Column, BcWorkflow } from '@vanillabp/bc-types';
|
|
6
5
|
import 'grommet';
|
|
7
6
|
import 'grommet/utils/index.js';
|
|
8
|
-
import './translate.js';
|
|
9
|
-
import './BcUserTask.js';
|
|
10
7
|
|
|
11
8
|
interface WorkflowCellProps extends DefaultListCellAwareProps<BcWorkflow> {
|
|
12
9
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
export { UserTaskForm } from './UserTaskForm.js';
|
|
2
2
|
export { ColumnsOfUserTaskFunction, UserTaskListCell } from './UserTaskListCell.js';
|
|
3
|
-
export { Column, ListItem, ListItemStatus, Person } from './ListCell.js';
|
|
4
3
|
export { WorkflowPage } from './WorkflowPage.js';
|
|
5
4
|
export { ColumnsOfWorkflowFunction, WorkflowListCell } from './WorkflowListCell.js';
|
|
6
|
-
export { BcWorkflow, GetUserTasksFunction, NavigateToWorkflowFunction } from './BcWorkflow.js';
|
|
7
|
-
export { AssignFunction, BcUserTask, ClaimFunction, OpenUserTaskFunction, OpenWorkflowFunction, UnassignFunction, UnclaimFunction } from './BcUserTask.js';
|
|
8
|
-
export { BcWorkflowModule } from './BcWorkflowModule.js';
|
|
9
5
|
export { WorkflowModule, WorkflowModuleComponent, WorkflowModuleComponentProps } from './WorkflowModuleComponent.js';
|
|
10
|
-
export { TranslationFunction } from './translate.js';
|
|
11
6
|
import 'react';
|
|
7
|
+
import '@vanillabp/bc-types';
|
|
12
8
|
import '@vanillabp/bc-official-gui-client';
|
|
13
9
|
import '../components/DefaultListCell.js';
|
|
14
10
|
import 'grommet';
|
package/dist/types/index.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export * from "./UserTaskForm.js";
|
|
2
2
|
export * from "./UserTaskListCell.js";
|
|
3
|
-
export * from "./ListCell.js";
|
|
4
3
|
export * from "./WorkflowPage.js";
|
|
5
4
|
export * from "./WorkflowListCell.js";
|
|
6
|
-
export * from "./BcWorkflow.js";
|
|
7
|
-
export * from "./BcUserTask.js";
|
|
8
|
-
export * from "./BcWorkflowModule.js";
|
|
9
5
|
export * from "./WorkflowModuleComponent.js";
|
|
10
|
-
export * from "./translate.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanillabp/bc-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/vanillabp/business-cockpit.git"
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
20
|
-
"@vanillabp/bc-official-gui-client": "0.1.
|
|
20
|
+
"@vanillabp/bc-official-gui-client": "0.1.4",
|
|
21
|
+
"@vanillabp/bc-types": "0.1.4",
|
|
21
22
|
"react-cookie": "4.1.1",
|
|
22
23
|
"usehooks-ts": "2.7.1"
|
|
23
24
|
},
|
|
@@ -68,9 +69,9 @@
|
|
|
68
69
|
"start": "tsup --watch",
|
|
69
70
|
"build": "tsup",
|
|
70
71
|
"test": "jest",
|
|
71
|
-
"unpublish:snapshot": "npm unpublish --force",
|
|
72
|
+
"unpublish:snapshot": "npm view --@vanillabp:registry=\"${NPM_REGISTRY}\" > /dev/null 2>&1 && npm unpublish --@vanillabp:registry=\"${NPM_REGISTRY}\" --force || echo \"Package not present – skipping unpublish\"",
|
|
72
73
|
"publish:snapshot": "npm publish --tag snapshot",
|
|
73
|
-
"version:snapshot": "npm version ${npm_config_newversion} --no-git-tag-version",
|
|
74
|
+
"version:snapshot": "npm version ${npm_config_newversion} --no-git-tag-version --allow-same-version",
|
|
74
75
|
"publish:release": "npm publish --access public"
|
|
75
76
|
}
|
|
76
77
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { UserTask } from '@vanillabp/bc-official-gui-client';
|
|
2
|
-
|
|
3
|
-
declare type OpenUserTaskFunction = () => void;
|
|
4
|
-
declare type OpenWorkflowFunction = () => void;
|
|
5
|
-
declare type AssignFunction = (userId: string) => void;
|
|
6
|
-
declare type UnassignFunction = (userId: string) => void;
|
|
7
|
-
declare type ClaimFunction = () => void;
|
|
8
|
-
declare type UnclaimFunction = () => void;
|
|
9
|
-
interface BcUserTask extends UserTask {
|
|
10
|
-
open: OpenUserTaskFunction;
|
|
11
|
-
navigateToWorkflow: OpenWorkflowFunction;
|
|
12
|
-
assign: AssignFunction;
|
|
13
|
-
unassign: UnassignFunction;
|
|
14
|
-
claim: ClaimFunction;
|
|
15
|
-
unclaim: UnclaimFunction;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { AssignFunction, BcUserTask, ClaimFunction, OpenUserTaskFunction, OpenWorkflowFunction, UnassignFunction, UnclaimFunction };
|
package/dist/types/BcUserTask.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Workflow } from '@vanillabp/bc-official-gui-client';
|
|
2
|
-
import { BcUserTask } from './BcUserTask.js';
|
|
3
|
-
|
|
4
|
-
declare type GetUserTasksFunction = (activeOnly: boolean, limitListAccordingToCurrentUsersPermissions: boolean) => Promise<Array<BcUserTask>>;
|
|
5
|
-
declare type NavigateToWorkflowFunction = () => void;
|
|
6
|
-
interface BcWorkflow extends Workflow {
|
|
7
|
-
navigateToWorkflow: NavigateToWorkflowFunction;
|
|
8
|
-
getUserTasks: GetUserTasksFunction;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { BcWorkflow, GetUserTasksFunction, NavigateToWorkflowFunction };
|
package/dist/types/BcWorkflow.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { UiUriType } from '@vanillabp/bc-official-gui-client';
|
|
2
|
-
|
|
3
|
-
interface BcWorkflowModule {
|
|
4
|
-
/**
|
|
5
|
-
* The workflow module of this usertask
|
|
6
|
-
* @type {string}
|
|
7
|
-
* @memberof UserTask
|
|
8
|
-
*/
|
|
9
|
-
workflowModuleId: string;
|
|
10
|
-
/**
|
|
11
|
-
* An URI as an entrypoint URI for UI components. Maybe a technical URL (e.g. for WEBPACK) or an URL targeting a human readable form (e.g. EXTERNAL)
|
|
12
|
-
* @type {string}
|
|
13
|
-
* @memberof UserTask
|
|
14
|
-
*/
|
|
15
|
-
uiUri: string;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @type {UiUriType}
|
|
19
|
-
* @memberof UserTask
|
|
20
|
-
*/
|
|
21
|
-
uiUriType: UiUriType;
|
|
22
|
-
/**
|
|
23
|
-
* An URI pointing to the workflow-module's own API (maybe used by user-task forms)
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof UserTask
|
|
26
|
-
*/
|
|
27
|
-
workflowModuleUri: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { BcWorkflowModule };
|
|
File without changes
|
package/dist/types/ListCell.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
interface Title {
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
}
|
|
4
|
-
interface Column {
|
|
5
|
-
title: Title;
|
|
6
|
-
path: string;
|
|
7
|
-
type?: 'value' | 'i18n' | 'person' | 'date' | 'date-time' | 'time';
|
|
8
|
-
priority: number;
|
|
9
|
-
width: string;
|
|
10
|
-
show: boolean;
|
|
11
|
-
sortable: boolean;
|
|
12
|
-
filterable: boolean;
|
|
13
|
-
resizeable: boolean;
|
|
14
|
-
}
|
|
15
|
-
interface Person {
|
|
16
|
-
id: string;
|
|
17
|
-
display?: string;
|
|
18
|
-
displayShort?: string;
|
|
19
|
-
email?: string;
|
|
20
|
-
avatar?: number;
|
|
21
|
-
details?: {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
declare enum ListItemStatus {
|
|
26
|
-
INITIAL = 0,
|
|
27
|
-
NEW = 1,
|
|
28
|
-
UPDATED = 2,
|
|
29
|
-
ENDED = 3,
|
|
30
|
-
REMOVED_FROM_LIST = 4
|
|
31
|
-
}
|
|
32
|
-
interface ListItem<D> {
|
|
33
|
-
id: string;
|
|
34
|
-
number: number;
|
|
35
|
-
data: D;
|
|
36
|
-
status: ListItemStatus;
|
|
37
|
-
selected: boolean;
|
|
38
|
-
read?: Date;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { Column, ListItem, ListItemStatus, Person };
|
package/dist/types/ListCell.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import "../chunk-YH4NJHER.js";
|
|
2
|
-
var ListItemStatus = /* @__PURE__ */ ((ListItemStatus2) => {
|
|
3
|
-
ListItemStatus2[ListItemStatus2["INITIAL"] = 0] = "INITIAL";
|
|
4
|
-
ListItemStatus2[ListItemStatus2["NEW"] = 1] = "NEW";
|
|
5
|
-
ListItemStatus2[ListItemStatus2["UPDATED"] = 2] = "UPDATED";
|
|
6
|
-
ListItemStatus2[ListItemStatus2["ENDED"] = 3] = "ENDED";
|
|
7
|
-
ListItemStatus2[ListItemStatus2["REMOVED_FROM_LIST"] = 4] = "REMOVED_FROM_LIST";
|
|
8
|
-
return ListItemStatus2;
|
|
9
|
-
})(ListItemStatus || {});
|
|
10
|
-
;
|
|
11
|
-
;
|
|
12
|
-
export {
|
|
13
|
-
ListItemStatus
|
|
14
|
-
};
|
package/dist/types/translate.js
DELETED
|
File without changes
|