@dotcms/types 1.2.1 → 1.2.2-next.2
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 +5 -5
- package/src/internal.d.ts +1 -0
- package/src/lib/client/internal.d.ts +9 -0
- package/src/lib/editor/internal.d.ts +1 -19
- package/src/lib/page/public.d.ts +9 -0
- package/index.esm.d.ts +0 -1
- package/internal.esm.d.ts +0 -1
- /package/{index.cjs.d.ts → index.d.ts} +0 -0
- /package/{internal.cjs.d.ts → internal.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcms/types",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-next.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"dotCMS",
|
|
6
6
|
"CMS",
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"./package.json": "./package.json",
|
|
13
13
|
".": {
|
|
14
14
|
"module": "./index.esm.js",
|
|
15
|
-
"types": "./index.
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
16
|
"import": "./index.cjs.mjs",
|
|
17
17
|
"default": "./index.cjs.js"
|
|
18
18
|
},
|
|
19
19
|
"./internal": {
|
|
20
20
|
"module": "./internal.esm.js",
|
|
21
|
-
"types": "./internal.
|
|
21
|
+
"types": "./internal.d.ts",
|
|
22
22
|
"import": "./internal.cjs.mjs",
|
|
23
23
|
"default": "./internal.cjs.js"
|
|
24
24
|
}
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
},
|
|
36
36
|
"module": "./index.esm.js",
|
|
37
37
|
"main": "./index.cjs.js",
|
|
38
|
-
"types": "./index.
|
|
39
|
-
}
|
|
38
|
+
"types": "./index.d.ts"
|
|
39
|
+
}
|
package/src/internal.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Callback for a fulfilled promise.
|
|
3
|
+
*
|
|
4
|
+
* @template T - The type of the response.
|
|
5
|
+
* @callback ThenableCallback
|
|
6
|
+
* @param {T} value - The response value.
|
|
7
|
+
* @returns {T | PromiseLike<T> | void} The processed response or a promise.
|
|
8
|
+
*/
|
|
9
|
+
export type ThenableCallback<T> = ((value: T) => T | PromiseLike<T> | void) | undefined | null;
|
|
@@ -99,24 +99,6 @@ export interface DotContentletAttributes {
|
|
|
99
99
|
'data-dot-type': string;
|
|
100
100
|
'data-dot-container': string;
|
|
101
101
|
'data-dot-on-number-of-pages': string;
|
|
102
|
+
'data-dot-style-properties'?: string;
|
|
102
103
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Helper type to create analytics attribute names with the correct prefix
|
|
105
|
-
* @internal
|
|
106
|
-
*/
|
|
107
|
-
type AnalyticsAttribute<T extends string> = `data-dot-analytics-${T}`;
|
|
108
|
-
/**
|
|
109
|
-
* Analytics attribute keys
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
type AnalyticsAttributeKey = 'identifier' | 'inode' | 'basetype' | 'contenttype' | 'title';
|
|
113
|
-
/**
|
|
114
|
-
* Interface representing the analytics data attributes of a DotCMS contentlet.
|
|
115
|
-
* Guarantees all keys have the 'data-dot-analytics-' prefix.
|
|
116
|
-
* Includes a class for fast DOM selection.
|
|
117
|
-
* @interface DotAnalyticsAttributes
|
|
118
|
-
*/
|
|
119
|
-
export type DotAnalyticsAttributes = {
|
|
120
|
-
[K in AnalyticsAttributeKey as AnalyticsAttribute<K>]: string;
|
|
121
|
-
};
|
|
122
104
|
export {};
|
package/src/lib/page/public.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { DotHttpError } from '../client/public';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a map of style property keys and their corresponding values
|
|
4
|
+
* for use in the style editor.
|
|
5
|
+
*
|
|
6
|
+
* Key is a string representing the property name,
|
|
7
|
+
* value can be any type, allowing flexibility for different style values.
|
|
8
|
+
*/
|
|
9
|
+
export type StyleEditorProperties = Record<string, unknown>;
|
|
2
10
|
/**
|
|
3
11
|
* Represents a map of container identifiers to their container objects
|
|
4
12
|
*
|
|
@@ -364,6 +372,7 @@ export interface DotCMSBasicContentlet {
|
|
|
364
372
|
widgetTitle?: string;
|
|
365
373
|
onNumberOfPages?: string;
|
|
366
374
|
__icon__?: string;
|
|
375
|
+
dotStyleProperties?: Record<string, unknown>;
|
|
367
376
|
_map?: Record<string, unknown>;
|
|
368
377
|
}
|
|
369
378
|
/**
|
package/index.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
package/internal.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/internal";
|
|
File without changes
|
|
File without changes
|