dochub-sdk 0.1.122 → 0.1.123

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.
@@ -15,6 +15,22 @@ export interface IDocHubObjectMeta {
15
15
  editor?: string; // Идентификатор редактора объектов
16
16
  }
17
17
 
18
+ /**
19
+ * Специальный формат адресации к объектам DocHub
20
+ * Формат: @<ID объекта>/<путь к объекту>[?<параметр=значение>[&<параметр=значение>]][#<ID презентации>]
21
+ * Например: @document/dochub.welcome?username=r.piontik#bio
22
+ */
23
+ export class DocHubObjectURL extends String {
24
+ constructor(...args:any) {
25
+ for (const value of args) {
26
+ if (!/^\@[a-zA-Z0-9_$]{1,}(\/[a-zA-Z0-9_$]{1,}){1,}(\?[^(#|\/)]*){0,1}(\#[^(#|\/|\?)]*){0,1}$/.test(value))
27
+ throw new Error(`Incorrect DocHubObjectSrc `, value);
28
+ }
29
+ super(...args);
30
+ return this;
31
+ }
32
+ }
33
+
18
34
  /**
19
35
  * VUE компонент редактора объекта
20
36
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.122",
3
+ "version": "0.1.123",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",