UBER-853 Move documents to Uberflow (#3700)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2023-09-15 15:31:24 +07:00
committed by GitHub
parent b61b47a4c3
commit 2d16709ccb
78 changed files with 10 additions and 3356 deletions
-7
View File
@@ -1,7 +0,0 @@
module.exports = {
extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/config/eslint.config.json'],
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json'
}
}
-4
View File
@@ -1,4 +0,0 @@
*
!/lib/**
!CHANGELOG.md
/lib/**/__tests__/
-18
View File
@@ -1,18 +0,0 @@
// The "rig.json" file directs tools to look for their config files in an external package.
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
{
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
/**
* (Required) The name of the rig package to inherit from.
* It should be an NPM package name with the "-rig" suffix.
*/
"rigPackageName": "@hcengineering/platform-rig"
/**
* (Optional) Selects a config profile from the rig package. The name must consist of
* lowercase alphanumeric words separated by hyphens, for example "sample-profile".
* If omitted, then the "default" profile will be used."
*/
// "rigProfile": "your-profile-name"
}
-41
View File
@@ -1,41 +0,0 @@
{
"name": "@hcengineering/document",
"version": "0.6.0",
"main": "lib/index.js",
"author": "Anticrm Platform Contributors",
"license": "EPL-2.0",
"scripts": {
"build": "heft build",
"build:watch": "tsc",
"lint:fix": "eslint --fix src",
"lint": "eslint src",
"format": "prettier --write src && eslint --fix src"
},
"devDependencies": {
"@hcengineering/platform-rig": "^0.6.0",
"@types/heft-jest": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-n": "^15.4.0",
"eslint": "^8.26.0",
"@typescript-eslint/parser": "^5.41.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"prettier": "^2.7.1",
"@rushstack/heft": "^0.47.9",
"typescript": "^4.3.5"
},
"dependencies": {
"@hcengineering/platform": "^0.6.9",
"@hcengineering/ui": "^0.6.10",
"@hcengineering/core": "^0.6.27",
"@hcengineering/view": "^0.6.8",
"@hcengineering/contact": "^0.6.19",
"@hcengineering/notification": "^0.6.14",
"@hcengineering/attachment": "^0.6.8"
},
"repository": "https://github.com/hcengineering/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}
-146
View File
@@ -1,146 +0,0 @@
//
// Copyright © 2022 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { Attachment } from '@hcengineering/attachment'
import { Employee } from '@hcengineering/contact'
import { AttachedDoc, Class, Doc, Markup, Ref, Space } from '@hcengineering/core'
import type { Asset, Metadata, Plugin } from '@hcengineering/platform'
import { IntlString, plugin } from '@hcengineering/platform'
import type { AnyComponent } from '@hcengineering/ui'
/**
* @public
*/
export interface Document extends Doc {
name: string
version: number // Latest approved version of document
latest: number // Latest draft version
// Collection of versions of this document.
versions: number
attachments?: number
comments?: number
labels?: number
// List of authors, who could edit the version until it will be published
// Combined with reviewers.
authors: Ref<Employee>[]
// List of persons who revieded version
reviewers: Ref<Employee>[]
// List of persions who approved version.
approvers: Ref<Employee>[]
requests: number
}
/**
* @public
*/
export enum DocumentVersionState {
Draft,
Approved,
Rejected
}
/**
* @public
*/
export interface DocumentVersion extends AttachedDoc {
version: number // Uniq version of document.
description: Markup
reason: Markup
impact: Markup
state: DocumentVersionState
// Defined only if document being proposed for review or approval
content: Markup
contentAttachmentId: Ref<CollaboratorDocument>
initialContentId: Ref<CollaboratorDocument> | undefined
// Attachments contain a CollaboratorDocument with content hold in S3
attachments: number
comments: number
}
/**
* A collaborative document handle, with a minio document in collaborative mode.
* @public
*/
export interface CollaboratorDocument extends Attachment {}
/**
* @public
*/
export enum DocumentRequestKind {
Review, // Review requested
Approve, // Approve requested
Changes // Changes requested
}
/**
* @public
*/
export interface DocumentRequest extends AttachedDoc {
kind: DocumentRequestKind
assignee: Ref<Employee>
message?: Markup
}
/**
* @public
*/
export const documentId = 'document' as Plugin
/**
* @public
*/
const documentPlugin = plugin(documentId, {
class: {
Document: '' as Ref<Class<Document>>,
DocumentVersion: '' as Ref<Class<DocumentVersion>>,
DocumentRequest: '' as Ref<Class<DocumentRequest>>,
CollaboratorDocument: '' as Ref<Class<CollaboratorDocument>>
},
component: {
CreateDocument: '' as AnyComponent
},
icon: {
DocumentApplication: '' as Asset,
NewDocument: '' as Asset,
Document: '' as Asset,
Library: '' as Asset
},
space: {
Documents: '' as Ref<Space>
},
app: {
Documents: '' as Ref<Doc>
},
string: {
CreateDocument: '' as IntlString
},
ids: {
NO_VERSION: '' as Ref<DocumentVersion>
},
metadata: {
CollaboratorUrl: '' as Metadata<string>
}
})
export default documentPlugin
-9
View File
@@ -1,9 +0,0 @@
{
"extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
"lib": ["esnext", "dom"]
}
}