@lilaquadrat/studio 2.2.4 → 2.2.5
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/lib/interfaces.d.ts +4 -2
- package/lib/interfaces.js.map +1 -1
- package/lib/src/interfaces/EditorActiveModule.interface.d.ts +4 -0
- package/lib/src/interfaces/EditorActiveModule.interface.js +3 -0
- package/lib/src/interfaces/EditorActiveModule.interface.js.map +1 -0
- package/lib/src/interfaces/ModuleGeneric.interface.d.ts +4 -4
- package/lib/src/interfaces/StudioIframeMessage.interface.d.ts +6 -0
- package/lib/src/interfaces/StudioIframeMessage.interface.js +3 -0
- package/lib/src/interfaces/StudioIframeMessage.interface.js.map +1 -0
- package/lib/src/prepareContent.d.ts +2 -2
- package/lib/src/prepareContent.js +7 -5
- package/lib/src/prepareContent.js.map +1 -1
- package/package.json +1 -1
package/lib/interfaces.d.ts
CHANGED
|
@@ -31,5 +31,7 @@ import PublishResult from './src/interfaces/PublishResult.interface';
|
|
|
31
31
|
import DataObject from './src/interfaces/DataObject.interface';
|
|
32
32
|
import CallResponse from './src/interfaces/CallResponse.interface';
|
|
33
33
|
import Content from './src/interfaces/Content.interface';
|
|
34
|
-
import ContentWithPositions from './src/interfaces/
|
|
35
|
-
|
|
34
|
+
import ContentWithPositions from './src/interfaces/ContentPrepared.interface';
|
|
35
|
+
import StudioIframeMessage from './src/interfaces/StudioIframeMessage.interface';
|
|
36
|
+
import EditorActiveModule from './src/interfaces/EditorActiveModule.interface';
|
|
37
|
+
export { BasicDataInterface, Scope, SingleScope, ScopeObject, HttpStatusCode, AppPermissions, DatabaseQuery, DatabaseQueryOptions, DatabaseQuerySites, HistoryReason, ListOfModels, ShareClientInterface, ShareClientOptions, Settings, Project, Me, History, Editor, EditorBase, Media, MediaInfo, MediaViewInfo, MediaStats, VersionInfo, ProjectScope, CompanyScope, UniversalScope, Permissions, ModuleGeneric, IModelv2, Company, Partner, Contract, Action, Publish, UniversalInterface, EditorLegacy, PublishResult, DataObject, CallResponse, Secret, Content, ContentWithPositions, StudioIframeMessage, EditorActiveModule };
|
package/lib/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../interfaces.ts"],"names":[],"mappings":";;;;;;AASA,+FAAkE;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../interfaces.ts"],"names":[],"mappings":";;;;;;AASA,+FAAkE;AAmChE,yBAnCK,6BAAc,CAmCL;AAzBhB,sEAAyG;AA8CvG,6FA9CO,gCAAY,OA8CP;AADZ,6FA7CqB,gCAAY,OA6CrB;AAEZ,+FA/CgD,kCAAc,OA+ChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorActiveModule.interface.js","sourceRoot":"","sources":["../../../src/interfaces/EditorActiveModule.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export default interface ModuleGeneric {
|
|
2
2
|
[key: string]: any;
|
|
3
|
-
id
|
|
3
|
+
id?: string;
|
|
4
4
|
type: string;
|
|
5
|
-
uuid
|
|
6
|
-
variant
|
|
7
|
-
position
|
|
5
|
+
uuid?: string;
|
|
6
|
+
variant?: string[];
|
|
7
|
+
position?: string;
|
|
8
8
|
layout?: 'first' | 'last' | '';
|
|
9
9
|
source?: string;
|
|
10
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StudioIframeMessage.interface.js","sourceRoot":"","sources":["../../../src/interfaces/StudioIframeMessage.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import Content from './interfaces/Content.interface';
|
|
2
|
-
import ContentWithPositions from './interfaces/
|
|
3
|
-
declare const _default: (content: Content
|
|
2
|
+
import ContentWithPositions from './interfaces/ContentPrepared.interface';
|
|
3
|
+
declare const _default: (content: Partial<Content>, layout?: Content | undefined, namespace?: string) => ContentWithPositions;
|
|
4
4
|
export default _default;
|
|
@@ -7,8 +7,9 @@ const filterMergeModules_1 = __importDefault(require("./filterMergeModules"));
|
|
|
7
7
|
const hardCopy_1 = __importDefault(require("./helpers/hardCopy"));
|
|
8
8
|
const addNamespace = (modules, namespace = 'lila') => {
|
|
9
9
|
modules === null || modules === void 0 ? void 0 : modules.forEach((single) => {
|
|
10
|
+
var _a;
|
|
10
11
|
// check if already in this namespace
|
|
11
|
-
if (single.type.match(new RegExp(`${namespace}-`)))
|
|
12
|
+
if ((_a = single.type) === null || _a === void 0 ? void 0 : _a.match(new RegExp(`${namespace}-`)))
|
|
12
13
|
return;
|
|
13
14
|
single.type = `${namespace}-${single.type}`;
|
|
14
15
|
// namespace also child modules of this module
|
|
@@ -18,12 +19,13 @@ const addNamespace = (modules, namespace = 'lila') => {
|
|
|
18
19
|
};
|
|
19
20
|
exports.default = (content, layout, namespace = 'lila') => {
|
|
20
21
|
const namespacedContent = (0, hardCopy_1.default)(content);
|
|
21
|
-
|
|
22
|
+
if (namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules)
|
|
23
|
+
addNamespace(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, namespace);
|
|
22
24
|
const combinedContent = {
|
|
23
25
|
settings: (namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.settings) || {},
|
|
24
|
-
top: (0, filterMergeModules_1.default)(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, 'top', layout === null || layout === void 0 ? void 0 : layout.modules),
|
|
25
|
-
content: (0, filterMergeModules_1.default)(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, 'content', layout === null || layout === void 0 ? void 0 : layout.modules),
|
|
26
|
-
bottom: (0, filterMergeModules_1.default)(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, 'bottom', layout === null || layout === void 0 ? void 0 : layout.modules),
|
|
26
|
+
top: (namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules) ? (0, filterMergeModules_1.default)(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, 'top', layout === null || layout === void 0 ? void 0 : layout.modules) : [],
|
|
27
|
+
content: (namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules) ? (0, filterMergeModules_1.default)(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, 'content', layout === null || layout === void 0 ? void 0 : layout.modules) : [],
|
|
28
|
+
bottom: (namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules) ? (0, filterMergeModules_1.default)(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, 'bottom', layout === null || layout === void 0 ? void 0 : layout.modules) : [],
|
|
27
29
|
};
|
|
28
30
|
return combinedContent;
|
|
29
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareContent.js","sourceRoot":"","sources":["../../src/prepareContent.ts"],"names":[],"mappings":";;;;;AAAA,8EAAsD;AACtD,kEAA0C;AAI1C,MAAM,YAAY,GAAG,CAAC,OAA2B,EAAE,YAAoB,MAAM,EAAE,EAAE;IAE/E,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"prepareContent.js","sourceRoot":"","sources":["../../src/prepareContent.ts"],"names":[],"mappings":";;;;;AAAA,8EAAsD;AACtD,kEAA0C;AAI1C,MAAM,YAAY,GAAG,CAAC,OAA2B,EAAE,YAAoB,MAAM,EAAE,EAAE;IAE/E,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;;QAE1B,qCAAqC;QACrC,IAAI,MAAA,MAAM,CAAC,IAAI,0CAAE,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;YAAE,OAAO;QAC5D,MAAM,CAAC,IAAI,GAAG,GAAG,S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