@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.
@@ -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/ContentWithPositions.interface';
35
- 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 };
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 };
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../interfaces.ts"],"names":[],"mappings":";;;;;;AASA,+FAAkE;AAiChE,yBAjCK,6BAAc,CAiCL;AAvBhB,sEAAyG;AA4CvG,6FA5CO,gCAAY,OA4CP;AADZ,6FA3CqB,gCAAY,OA2CrB;AAEZ,+FA7CgD,kCAAc,OA6ChD"}
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,4 @@
1
+ export default interface EditorActiveModule {
2
+ uuid?: string;
3
+ position?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EditorActiveModule.interface.js.map
@@ -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: string;
3
+ id?: string;
4
4
  type: string;
5
- uuid: string;
6
- variant: string[];
7
- position: string;
5
+ uuid?: string;
6
+ variant?: string[];
7
+ position?: string;
8
8
  layout?: 'first' | 'last' | '';
9
9
  source?: string;
10
10
  }
@@ -0,0 +1,6 @@
1
+ export default interface StudioIframeMessage<T> {
2
+ data: {
3
+ type: 'studio-content' | 'studio-editor-settings' | 'studio-settings' | 'studio-active';
4
+ data: T;
5
+ };
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=StudioIframeMessage.interface.js.map
@@ -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/ContentWithPositions.interface';
3
- declare const _default: (content: Content, layout?: Content | undefined, namespace?: string) => ContentWithPositions;
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
- addNamespace(namespacedContent === null || namespacedContent === void 0 ? void 0 : namespacedContent.modules, namespace);
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;QAE1B,qCAAqC;QACrC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;YAAE,OAAO;QAC3D,MAAM,CAAC,IAAI,GAAG,GAAG,SAAS,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAE5C,8CAA8C;QAC9C,IAAI,MAAM,CAAC,OAAO;YAAE,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAE9D,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC;AAEF,kBAAe,CAAC,OAAgB,EAAE,MA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AAjB,iBAAiB,CAAE,OAAO,EAAC,CAAC,CAAC,IAAA,4BAAkB,EAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;KACpH,CAAC;IAEF,OAAO,eAAe,CAAC;AAEzB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/studio",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "classes and tools for STUDIO",
5
5
  "license": "MIT",
6
6
  "homepage": "https://lilaquadrat.de",