@nascentdigital/funnel-editor-contentful 4.6.7 → 5.0.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/dist/Editor.d.ts +6 -1
- package/dist/Editor.js +17 -1
- package/dist/EditorApp.js +11 -9
- package/dist/EditorPageRouter.d.ts +1 -0
- package/dist/EditorPageRouter.js +40 -0
- package/dist/EntryEditor.js +43 -1
- package/dist/EntrySidebar.js +18 -1
- package/dist/asset/index.d.ts +1 -0
- package/dist/{page/hooks → asset}/index.js +1 -1
- package/dist/asset/repository/AssetRepository.d.ts +10 -0
- package/dist/asset/repository/AssetRepository.js +33 -0
- package/dist/asset/repository/index.d.ts +1 -0
- package/dist/{core/api → asset/repository}/index.js +1 -3
- package/dist/collection/controller/ContentfulCollectionController.d.ts +41 -0
- package/dist/collection/controller/ContentfulCollectionController.js +278 -0
- package/dist/collection/controller/ContentfulCollectionControllerContainer.d.ts +5 -0
- package/dist/collection/controller/ContentfulCollectionControllerContainer.js +28 -0
- package/dist/collection/controller/index.d.ts +3 -0
- package/dist/collection/controller/index.js +19 -0
- package/dist/collection/controller/useContentfulCollectionController.d.ts +2 -0
- package/dist/collection/controller/useContentfulCollectionController.js +8 -0
- package/dist/collection/domain/Collection.d.ts +108 -0
- package/dist/collection/domain/Collection.js +386 -0
- package/dist/collection/domain/index.d.ts +1 -0
- package/dist/collection/domain/index.js +17 -0
- package/dist/collection/index.d.ts +3 -0
- package/dist/collection/index.js +19 -0
- package/dist/collection/repository/CollectionRepository.d.ts +49 -0
- package/dist/collection/repository/CollectionRepository.js +210 -0
- package/dist/collection/repository/index.d.ts +1 -0
- package/dist/collection/repository/index.js +17 -0
- package/dist/collection/screens/CollectionEditor.d.ts +1 -0
- package/dist/collection/screens/CollectionEditor.js +59 -0
- package/dist/collection/screens/index.d.ts +1 -0
- package/dist/collection/screens/index.js +17 -0
- package/dist/core/bridge/AppBridgeContainer.d.ts +9 -0
- package/dist/core/bridge/AppBridgeContainer.js +55 -0
- package/dist/core/bridge/AppBridgeContext.d.ts +8 -0
- package/dist/core/bridge/AppBridgeContext.js +11 -0
- package/dist/core/bridge/AppMessage.d.ts +19 -0
- package/dist/core/bridge/AppMessage.js +19 -0
- package/dist/core/bridge/index.d.ts +4 -0
- package/dist/core/bridge/index.js +20 -0
- package/dist/core/bridge/useAppBridge.d.ts +8 -0
- package/dist/core/bridge/useAppBridge.js +24 -0
- package/dist/core/client/ContentfulClientContainer.d.ts +8 -0
- package/dist/core/client/ContentfulClientContainer.js +43 -0
- package/dist/core/client/ContentfulClientContext.d.ts +8 -0
- package/dist/core/client/ContentfulClientContext.js +8 -0
- package/dist/core/client/index.d.ts +3 -0
- package/dist/core/client/index.js +19 -0
- package/dist/core/client/useContentfulClient.d.ts +4 -0
- package/dist/core/client/useContentfulClient.js +24 -0
- package/dist/core/contentful/Contentful.d.ts +33 -0
- package/dist/core/contentful/Contentful.js +67 -0
- package/dist/core/contentful/ContentfulAsset.d.ts +23 -0
- package/dist/core/contentful/ContentfulAsset.js +89 -0
- package/dist/core/contentful/ContentfulCollection.d.ts +29 -0
- package/dist/core/contentful/ContentfulCollection.js +97 -0
- package/dist/core/contentful/ContentfulPage.d.ts +31 -0
- package/dist/core/contentful/ContentfulPage.js +84 -0
- package/dist/core/contentful/ContentfulRefs.d.ts +16 -0
- package/dist/core/contentful/ContentfulRefs.js +152 -0
- package/dist/core/contentful/index.d.ts +5 -0
- package/dist/core/contentful/index.js +21 -0
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +3 -2
- package/dist/core/repository/CollectionSerializer.d.ts +9 -0
- package/dist/core/repository/CollectionSerializer.js +41 -0
- package/dist/core/repository/LocalCollectionRepository.d.ts +27 -0
- package/dist/core/repository/LocalCollectionRepository.js +143 -0
- package/dist/core/repository/LocalPageRepository.d.ts +16 -0
- package/dist/core/repository/LocalPageRepository.js +153 -0
- package/dist/core/repository/PageSerializer.d.ts +3 -3
- package/dist/core/repository/PageSerializer.js +18 -14
- package/dist/core/repository/RemoteCollectionRepository.d.ts +19 -0
- package/dist/core/repository/RemoteCollectionRepository.js +236 -0
- package/dist/core/repository/RemotePageRepository.d.ts +14 -0
- package/dist/core/repository/RemotePageRepository.js +113 -0
- package/dist/core/repository/index.d.ts +4 -1
- package/dist/core/repository/index.js +4 -1
- package/dist/explore/components/Header.d.ts +26 -0
- package/dist/explore/components/Header.js +31 -0
- package/dist/explore/components/index.d.ts +1 -0
- package/dist/explore/components/index.js +17 -0
- package/dist/explore/index.d.ts +1 -0
- package/dist/explore/index.js +17 -0
- package/dist/explore/screens/Dashboard.d.ts +1 -0
- package/dist/explore/screens/Dashboard.js +22 -0
- package/dist/explore/screens/PageExplorer.d.ts +1 -0
- package/dist/explore/screens/PageExplorer.js +9 -0
- package/dist/explore/screens/SiteExplorer.d.ts +1 -0
- package/dist/explore/screens/SiteExplorer.js +24 -0
- package/dist/explore/screens/index.d.ts +3 -0
- package/dist/explore/screens/index.js +19 -0
- package/dist/page/{hooks/PageController.d.ts → controller/ContentfulPageController.d.ts} +17 -6
- package/dist/page/controller/ContentfulPageController.js +277 -0
- package/dist/page/controller/ContentfulPageControllerContainer.d.ts +5 -0
- package/dist/page/controller/ContentfulPageControllerContainer.js +28 -0
- package/dist/page/controller/index.d.ts +3 -0
- package/dist/page/controller/index.js +19 -0
- package/dist/page/controller/useContentfulPageController.d.ts +2 -0
- package/dist/page/controller/useContentfulPageController.js +8 -0
- package/dist/{core → page}/domain/Page.d.ts +71 -10
- package/dist/page/domain/Page.js +631 -0
- package/dist/page/index.d.ts +3 -0
- package/dist/page/index.js +3 -0
- package/dist/page/repository/PageRepository.d.ts +45 -0
- package/dist/page/repository/PageRepository.js +224 -0
- package/dist/page/repository/index.d.ts +1 -0
- package/dist/page/repository/index.js +17 -0
- package/dist/page/screens/PageEditor.js +29 -15
- package/package.json +10 -4
- package/dist/core/api/EditorApiClient.d.ts +0 -7
- package/dist/core/api/EditorApiClient.js +0 -29
- package/dist/core/api/EditorApiContainer.d.ts +0 -5
- package/dist/core/api/EditorApiContainer.js +0 -16
- package/dist/core/api/EditorApiContext.d.ts +0 -7
- package/dist/core/api/EditorApiContext.js +0 -6
- package/dist/core/api/index.d.ts +0 -3
- package/dist/core/api/useEditorApi.d.ts +0 -2
- package/dist/core/api/useEditorApi.js +0 -12
- package/dist/core/domain/Page.js +0 -180
- package/dist/core/repository/PageRepository.d.ts +0 -12
- package/dist/core/repository/PageRepository.js +0 -23
- package/dist/page/hooks/PageController.js +0 -107
- package/dist/page/hooks/index.d.ts +0 -1
- /package/dist/{core → page}/domain/index.d.ts +0 -0
- /package/dist/{core → page}/domain/index.js +0 -0
package/dist/Editor.d.ts
CHANGED
package/dist/Editor.js
CHANGED
|
@@ -3,8 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Editor = Editor;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_apps_toolkit_1 = require("@contentful/react-apps-toolkit");
|
|
6
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
7
|
+
const react_1 = require("react");
|
|
6
8
|
const EditorApp_1 = require("./EditorApp");
|
|
7
9
|
// wrapper around editor app to provide Contentful SDK
|
|
8
|
-
function Editor() {
|
|
10
|
+
function Editor({ fonts }) {
|
|
11
|
+
// bind font to root on mount
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
// skip if there are no fonts or HTML root
|
|
14
|
+
const html = funnel_core_1.Browser.getHtml();
|
|
15
|
+
if (fonts.length === 0 || !html) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
// apply fonts (create a copy to unbind
|
|
19
|
+
const fontClasses = fonts.slice();
|
|
20
|
+
html.classList.add(...fontClasses);
|
|
21
|
+
// remove fonts on update
|
|
22
|
+
return () => html.classList.remove(...fontClasses);
|
|
23
|
+
}, [fonts]);
|
|
24
|
+
// render
|
|
9
25
|
return ((0, jsx_runtime_1.jsx)(react_apps_toolkit_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(EditorApp_1.EditorApp, {}) }));
|
|
10
26
|
}
|
package/dist/EditorApp.js
CHANGED
|
@@ -6,25 +6,27 @@ const app_sdk_1 = require("@contentful/app-sdk");
|
|
|
6
6
|
const react_apps_toolkit_1 = require("@contentful/react-apps-toolkit");
|
|
7
7
|
const components_1 = require("@nascentdigital/funnel-editor/components");
|
|
8
8
|
const core_1 = require("./core");
|
|
9
|
+
const EditorPageRouter_1 = require("./EditorPageRouter");
|
|
9
10
|
const EntryEditor_1 = require("./EntryEditor");
|
|
10
11
|
const EntrySidebar_1 = require("./EntrySidebar");
|
|
11
12
|
// editor
|
|
12
13
|
function EditorApp() {
|
|
13
|
-
// hooks
|
|
14
|
+
// bind hooks
|
|
14
15
|
const sdk = (0, react_apps_toolkit_1.useSDK)();
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
// page
|
|
17
|
+
if (sdk.location.is(app_sdk_1.locations.LOCATION_PAGE)) {
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(components_1.AppStateContainer, { children: (0, jsx_runtime_1.jsx)(core_1.ContentfulClientContainer, { sdk: sdk, children: (0, jsx_runtime_1.jsx)(EditorPageRouter_1.EditorPageRouter, {}) }) }));
|
|
19
|
+
}
|
|
20
|
+
// entry
|
|
21
|
+
else if (sdk.location.is(app_sdk_1.locations.LOCATION_ENTRY_EDITOR)) {
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(components_1.AppStateContainer, { children: (0, jsx_runtime_1.jsx)(core_1.AppBridgeContainer, { children: (0, jsx_runtime_1.jsx)(core_1.ContentfulClientContainer, { sdk: sdk, children: (0, jsx_runtime_1.jsx)(EntryEditor_1.EntryEditor, {}) }) }) }));
|
|
19
23
|
}
|
|
20
24
|
// entry sidebar
|
|
21
25
|
else if (sdk.location.is(app_sdk_1.locations.LOCATION_ENTRY_SIDEBAR)) {
|
|
22
|
-
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(components_1.AppStateContainer, { children: (0, jsx_runtime_1.jsx)(core_1.AppBridgeContainer, { children: (0, jsx_runtime_1.jsx)(EntrySidebar_1.EntrySidebar, {}) }) }));
|
|
23
27
|
}
|
|
24
28
|
// fallback
|
|
25
29
|
else {
|
|
26
|
-
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: "Unsupported location" }));
|
|
27
31
|
}
|
|
28
|
-
// render
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(core_1.EditorApiContainer, { children: (0, jsx_runtime_1.jsx)(components_1.DialogContainer, { children: content }) }));
|
|
30
32
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function EditorPageRouter(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditorPageRouter = EditorPageRouter;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_apps_toolkit_1 = require("@contentful/react-apps-toolkit");
|
|
6
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
7
|
+
const components_1 = require("@nascentdigital/funnel-editor/components");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const react_router_1 = require("react-router");
|
|
10
|
+
const asset_1 = require("./asset");
|
|
11
|
+
const collection_1 = require("./collection");
|
|
12
|
+
const core_1 = require("./core");
|
|
13
|
+
const explore_1 = require("./explore");
|
|
14
|
+
const page_1 = require("./page");
|
|
15
|
+
// router
|
|
16
|
+
function EditorPageRouter() {
|
|
17
|
+
// bind props + hooks
|
|
18
|
+
const sdk = (0, react_apps_toolkit_1.useSDK)();
|
|
19
|
+
const contentfulClient = (0, core_1.useContentfulClient)();
|
|
20
|
+
const appState = (0, components_1.useAppState)();
|
|
21
|
+
const { regionalization } = funnel_core_1.AppConfig.brandConfig();
|
|
22
|
+
const region = funnel_core_1.RegionsConfig.getDefaultRegion(regionalization);
|
|
23
|
+
// create repositories
|
|
24
|
+
const { assetRepository, collectionRepository, pageRepository } = (0, react_1.useMemo)(() => ({
|
|
25
|
+
assetRepository: new asset_1.AssetRepository(sdk),
|
|
26
|
+
collectionRepository: new collection_1.CollectionRepository({ sdk, contentfulClient }),
|
|
27
|
+
pageRepository: new page_1.PageRepository({ sdk, contentfulClient })
|
|
28
|
+
}), [sdk, contentfulClient]);
|
|
29
|
+
// create contexts
|
|
30
|
+
const siteContext = (0, react_1.useMemo)(() => {
|
|
31
|
+
const site = new components_1.Site({ appState, repository: pageRepository, region });
|
|
32
|
+
return { site };
|
|
33
|
+
}, [appState, pageRepository, region]);
|
|
34
|
+
const collectionsContext = (0, react_1.useMemo)(() => {
|
|
35
|
+
const collections = new components_1.Collections({ appState, repository: collectionRepository });
|
|
36
|
+
return { collections };
|
|
37
|
+
}, [appState, collectionRepository]);
|
|
38
|
+
// render
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(react_router_1.BrowserRouter, { children: (0, jsx_runtime_1.jsx)(components_1.AssetRepositoryContext.Provider, { value: assetRepository, children: (0, jsx_runtime_1.jsx)(components_1.CollectionRepositoryContext.Provider, { value: collectionRepository, children: (0, jsx_runtime_1.jsx)(components_1.PageRepositoryContext.Provider, { value: pageRepository, children: (0, jsx_runtime_1.jsx)(components_1.SiteContext.Provider, { value: siteContext, children: (0, jsx_runtime_1.jsx)(components_1.CollectionsContext.Provider, { value: collectionsContext, children: (0, jsx_runtime_1.jsx)(components_1.DialogContainer, { children: (0, jsx_runtime_1.jsx)(components_1.CenterSheetContainer, { children: (0, jsx_runtime_1.jsx)(components_1.SplashContainer, { message: "Initializing...", children: (0, jsx_runtime_1.jsx)(react_router_1.Routes, { children: (0, jsx_runtime_1.jsxs)(react_router_1.Route, { path: "/contentful", children: [(0, jsx_runtime_1.jsx)(react_router_1.Route, { index: true, element: (0, jsx_runtime_1.jsx)(explore_1.Dashboard, {}) }), (0, jsx_runtime_1.jsxs)(react_router_1.Route, { path: "pages", children: [(0, jsx_runtime_1.jsx)(react_router_1.Route, { index: true, element: (0, jsx_runtime_1.jsx)(explore_1.SiteExplorer, {}) }), (0, jsx_runtime_1.jsx)(react_router_1.Route, { path: ":page", element: (0, jsx_runtime_1.jsx)(explore_1.PageExplorer, {}) })] })] }) }) }) }) }) }) }) }) }) }) }));
|
|
40
|
+
}
|
package/dist/EntryEditor.js
CHANGED
|
@@ -2,8 +2,50 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EntryEditor = EntryEditor;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_apps_toolkit_1 = require("@contentful/react-apps-toolkit");
|
|
6
|
+
const contentful_1 = require("@nascentdigital/funnel-cms/contentful");
|
|
7
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
8
|
+
const components_1 = require("@nascentdigital/funnel-editor/components");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const asset_1 = require("./asset");
|
|
11
|
+
const collection_1 = require("./collection");
|
|
12
|
+
const core_1 = require("./core");
|
|
5
13
|
const page_1 = require("./page");
|
|
6
14
|
// entry editor
|
|
7
15
|
function EntryEditor() {
|
|
8
|
-
|
|
16
|
+
// bind props + hooks
|
|
17
|
+
const sdk = (0, react_apps_toolkit_1.useSDK)();
|
|
18
|
+
const contentfulClient = (0, core_1.useContentfulClient)();
|
|
19
|
+
const appState = (0, components_1.useAppState)();
|
|
20
|
+
const { regionalization } = funnel_core_1.AppConfig.brandConfig();
|
|
21
|
+
let region = funnel_core_1.RegionsConfig.getDefaultRegion(regionalization);
|
|
22
|
+
// create repositories
|
|
23
|
+
const { assetRepository, collectionRepository, pageRepository } = (0, react_1.useMemo)(() => ({
|
|
24
|
+
assetRepository: new asset_1.AssetRepository(sdk),
|
|
25
|
+
collectionRepository: new collection_1.CollectionRepository({ sdk, contentfulClient }),
|
|
26
|
+
pageRepository: new page_1.PageRepository({ sdk, contentfulClient })
|
|
27
|
+
}), [sdk, contentfulClient]);
|
|
28
|
+
// page editor
|
|
29
|
+
let content;
|
|
30
|
+
const { entry } = sdk;
|
|
31
|
+
const { contentType: { sys: { id } } } = entry.getSys();
|
|
32
|
+
if (id === contentful_1.ContentfulPageData.contentType) {
|
|
33
|
+
region = entry.fields.region.getValue();
|
|
34
|
+
content = ((0, jsx_runtime_1.jsx)(page_1.ContentfulPageControllerContainer, { children: (0, jsx_runtime_1.jsx)(page_1.PageEditor, {}) }));
|
|
35
|
+
}
|
|
36
|
+
// collection editor
|
|
37
|
+
else if (id === contentful_1.ContentfulCollectionData.contentType) {
|
|
38
|
+
content = ((0, jsx_runtime_1.jsx)(collection_1.ContentfulCollectionControllerContainer, { children: (0, jsx_runtime_1.jsx)(collection_1.CollectionEditor, {}) }));
|
|
39
|
+
}
|
|
40
|
+
// create contexts
|
|
41
|
+
const siteContext = (0, react_1.useMemo)(() => {
|
|
42
|
+
const site = new components_1.Site({ appState, repository: pageRepository, region });
|
|
43
|
+
return { site };
|
|
44
|
+
}, [appState, pageRepository, region]);
|
|
45
|
+
const collectionsContext = (0, react_1.useMemo)(() => {
|
|
46
|
+
const collections = new components_1.Collections({ appState, repository: collectionRepository });
|
|
47
|
+
return { collections };
|
|
48
|
+
}, [appState, collectionRepository]);
|
|
49
|
+
// render
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(components_1.AssetRepositoryContext.Provider, { value: assetRepository, children: (0, jsx_runtime_1.jsx)(components_1.CollectionRepositoryContext.Provider, { value: collectionRepository, children: (0, jsx_runtime_1.jsx)(components_1.PageRepositoryContext.Provider, { value: pageRepository, children: (0, jsx_runtime_1.jsx)(components_1.SiteContext.Provider, { value: siteContext, children: (0, jsx_runtime_1.jsx)(components_1.CollectionsContext.Provider, { value: collectionsContext, children: (0, jsx_runtime_1.jsx)(components_1.DialogContainer, { children: (0, jsx_runtime_1.jsx)(components_1.CenterSheetContainer, { children: (0, jsx_runtime_1.jsx)(components_1.SplashContainer, { message: "Initializing...", children: content }) }) }) }) }) }) }) }));
|
|
9
51
|
}
|
package/dist/EntrySidebar.js
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EntrySidebar = EntrySidebar;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const core_1 = require("./core");
|
|
8
|
+
// component
|
|
5
9
|
function EntrySidebar() {
|
|
6
|
-
|
|
10
|
+
// setup hooks
|
|
11
|
+
const bridge = (0, core_1.useAppBridge)();
|
|
12
|
+
const [itemId, setItemId] = (0, react_1.useState)();
|
|
13
|
+
// listen to bridge events
|
|
14
|
+
(0, react_1.useEffect)(() => {
|
|
15
|
+
// subscribe to block nav messages
|
|
16
|
+
const subscription = bridge.messages$
|
|
17
|
+
.pipe((0, rxjs_1.filter)(core_1.AppBlockNavMessage.guard))
|
|
18
|
+
.subscribe(message => setItemId(message.itemId));
|
|
19
|
+
// unsubscribe on unmount
|
|
20
|
+
return () => subscription.unsubscribe();
|
|
21
|
+
});
|
|
22
|
+
// render
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("h3", { children: ["Entry sidebar ", itemId] }) }));
|
|
7
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './repository';
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./repository"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EditorAppSDK } from '@contentful/app-sdk';
|
|
2
|
+
import { IAssetRepository } from '@nascentdigital/funnel-editor/components';
|
|
3
|
+
export declare class AssetRepository implements IAssetRepository {
|
|
4
|
+
readonly sdk: EditorAppSDK;
|
|
5
|
+
constructor(sdk: EditorAppSDK);
|
|
6
|
+
search(args: IAssetRepository.Search.Args): Promise<IAssetRepository.Search.Result>;
|
|
7
|
+
get(args: IAssetRepository.Get.Args): Promise<IAssetRepository.Get.Result>;
|
|
8
|
+
update(args: IAssetRepository.Update.Args): Promise<IAssetRepository.Update.Result>;
|
|
9
|
+
uploadFile(args: IAssetRepository.UploadFile.Args): Promise<IAssetRepository.UploadFile.Result>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssetRepository = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const core_1 = require("../../core");
|
|
6
|
+
// class
|
|
7
|
+
class AssetRepository {
|
|
8
|
+
constructor(sdk) {
|
|
9
|
+
this.sdk = sdk;
|
|
10
|
+
}
|
|
11
|
+
async search(args) {
|
|
12
|
+
// TODO: implement fetching assets
|
|
13
|
+
return {
|
|
14
|
+
items: [],
|
|
15
|
+
page: 1,
|
|
16
|
+
pageCount: 0,
|
|
17
|
+
totalItemCount: 0
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
async get(args) {
|
|
21
|
+
throw new funnel_core_1.NotImplementedError();
|
|
22
|
+
}
|
|
23
|
+
async update(args) {
|
|
24
|
+
throw new funnel_core_1.NotImplementedError();
|
|
25
|
+
}
|
|
26
|
+
async uploadFile(args) {
|
|
27
|
+
// upload asset
|
|
28
|
+
const asset = await core_1.ContentfulAsset.upload(args, this.sdk);
|
|
29
|
+
// return result
|
|
30
|
+
return core_1.ContentfulAsset.serialize(asset, this.sdk.locales.default);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.AssetRepository = AssetRepository;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AssetRepository';
|
|
@@ -14,6 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./EditorApiContainer"), exports);
|
|
19
|
-
__exportStar(require("./useEditorApi"), exports);
|
|
17
|
+
__exportStar(require("./AssetRepository"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EntrySys } from '@contentful/app-sdk';
|
|
2
|
+
import { CollectionGroup, CollectionTarget, ICollection, ICollectionController } from '@nascentdigital/funnel-editor/components';
|
|
3
|
+
import { type Observable } from 'rxjs';
|
|
4
|
+
import { Collection } from '../domain';
|
|
5
|
+
import { CollectionRepository } from '../repository';
|
|
6
|
+
export declare class ContentfulCollectionController implements ICollectionController {
|
|
7
|
+
readonly collectionRepository: CollectionRepository;
|
|
8
|
+
private readonly _eventBus;
|
|
9
|
+
private _state;
|
|
10
|
+
private _collectionGroup?;
|
|
11
|
+
private _collection?;
|
|
12
|
+
private _collectionSys?;
|
|
13
|
+
private _queuedSave?;
|
|
14
|
+
private _queuedSync?;
|
|
15
|
+
private _collectionSubscription?;
|
|
16
|
+
constructor(args: ContentfulCollectionController.ConstructorArgs);
|
|
17
|
+
get events$(): Observable<ICollectionController.Event | ICollection.Event>;
|
|
18
|
+
get state(): ICollectionController.State;
|
|
19
|
+
private set state(value);
|
|
20
|
+
get ready(): boolean;
|
|
21
|
+
get languages(): ("id" | "aa" | "ab" | "ae" | "af" | "ak" | "am" | "an" | "ar" | "as" | "av" | "ay" | "az" | "ba" | "be" | "bg" | "bh" | "bi" | "bm" | "bn" | "bo" | "br" | "bs" | "ca" | "ce" | "ch" | "co" | "cr" | "cs" | "cu" | "cv" | "cy" | "da" | "de" | "dv" | "dz" | "ee" | "el" | "en" | "eo" | "es" | "et" | "eu" | "fa" | "ff" | "fi" | "fj" | "fo" | "fr" | "fy" | "ga" | "gd" | "gl" | "gn" | "gu" | "gv" | "ha" | "he" | "hi" | "ho" | "hr" | "ht" | "hu" | "hy" | "hz" | "ia" | "ie" | "ig" | "ii" | "ik" | "io" | "is" | "it" | "iu" | "ja" | "jv" | "ka" | "kg" | "ki" | "kj" | "kk" | "kl" | "km" | "kn" | "ko" | "kr" | "ks" | "ku" | "kv" | "kw" | "ky" | "la" | "lb" | "lg" | "li" | "ln" | "lo" | "lt" | "lu" | "lv" | "mg" | "mh" | "mi" | "mk" | "ml" | "mn" | "mr" | "ms" | "mt" | "my" | "na" | "nb" | "nd" | "ne" | "ng" | "nl" | "nn" | "no" | "nr" | "nv" | "ny" | "oc" | "oj" | "om" | "or" | "os" | "pa" | "pi" | "pl" | "ps" | "pt" | "qu" | "rm" | "rn" | "ro" | "ru" | "rw" | "sa" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sq" | "sr" | "ss" | "st" | "su" | "sv" | "sw" | "ta" | "te" | "tg" | "th" | "ti" | "tk" | "tl" | "tn" | "to" | "tr" | "ts" | "tt" | "tw" | "ty" | "ug" | "uk" | "ur" | "uz" | "ve" | "vi" | "vo" | "wa" | "wo" | "xh" | "yi" | "yo" | "za" | "zh" | "zu")[];
|
|
22
|
+
get collectionSys(): EntrySys | undefined;
|
|
23
|
+
private set collectionSys(value);
|
|
24
|
+
get collectionGroup(): CollectionGroup | undefined;
|
|
25
|
+
private set collectionGroup(value);
|
|
26
|
+
get collection(): Collection | undefined;
|
|
27
|
+
set collection(collection: Collection | undefined);
|
|
28
|
+
sync(updatedSys: EntrySys): Promise<void>;
|
|
29
|
+
load(): Promise<void>;
|
|
30
|
+
createLanguage(target: CollectionTarget): Promise<void>;
|
|
31
|
+
unpublish(): Promise<void>;
|
|
32
|
+
save(collection: Collection): Promise<void>;
|
|
33
|
+
reload(): Promise<void>;
|
|
34
|
+
private processQueues;
|
|
35
|
+
private raiseEvent;
|
|
36
|
+
}
|
|
37
|
+
export declare namespace ContentfulCollectionController {
|
|
38
|
+
type ConstructorArgs = {
|
|
39
|
+
collectionRepository: CollectionRepository;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentfulCollectionController = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
const components_1 = require("@nascentdigital/funnel-editor/components");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
// class
|
|
8
|
+
class ContentfulCollectionController {
|
|
9
|
+
constructor(args) {
|
|
10
|
+
// initialize instance variables
|
|
11
|
+
this.collectionRepository = args.collectionRepository;
|
|
12
|
+
this._eventBus = new funnel_core_1.EventBus();
|
|
13
|
+
this._state = 'uninitialized';
|
|
14
|
+
}
|
|
15
|
+
get events$() {
|
|
16
|
+
return this._eventBus.events$
|
|
17
|
+
.pipe((0, rxjs_1.filter)(e => components_1.ICollectionController.Event.filter(e) || components_1.ICollection.Event.filter(e)));
|
|
18
|
+
}
|
|
19
|
+
get state() {
|
|
20
|
+
return this._state;
|
|
21
|
+
}
|
|
22
|
+
set state(value) {
|
|
23
|
+
// skip if unchanged
|
|
24
|
+
if (this._state === value) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
// or update
|
|
28
|
+
this._state = value;
|
|
29
|
+
// raise event
|
|
30
|
+
this.raiseEvent('state.changed');
|
|
31
|
+
// process queues if ready (might be noop)
|
|
32
|
+
if (value === 'ready') {
|
|
33
|
+
this.processQueues().catch(console.error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get ready() {
|
|
37
|
+
const { _state } = this;
|
|
38
|
+
return _state !== 'uninitialized' && _state !== 'initializing';
|
|
39
|
+
}
|
|
40
|
+
get languages() {
|
|
41
|
+
const brand = funnel_core_1.AppConfig.brandConfig();
|
|
42
|
+
return funnel_core_1.RegionsConfig.getLanguages(brand.regionalization);
|
|
43
|
+
}
|
|
44
|
+
get collectionSys() {
|
|
45
|
+
return this._collectionSys;
|
|
46
|
+
}
|
|
47
|
+
set collectionSys(sys) {
|
|
48
|
+
this._collectionSys = sys;
|
|
49
|
+
}
|
|
50
|
+
get collectionGroup() {
|
|
51
|
+
return this._collectionGroup;
|
|
52
|
+
}
|
|
53
|
+
set collectionGroup(collectionGroup) {
|
|
54
|
+
// skip if group is the same
|
|
55
|
+
if (this._collectionGroup === collectionGroup) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// update group
|
|
59
|
+
this._collectionGroup = collectionGroup;
|
|
60
|
+
// raise event
|
|
61
|
+
this.raiseEvent('collectionGroup.changed');
|
|
62
|
+
}
|
|
63
|
+
get collection() {
|
|
64
|
+
return this._collection;
|
|
65
|
+
}
|
|
66
|
+
set collection(collection) {
|
|
67
|
+
// skip if collection is the same
|
|
68
|
+
if (this._collection === collection) {
|
|
69
|
+
console.debug('[ContentfulCollectionController] ignoring collection change for', collection);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// unbind previous subscription (if any)
|
|
73
|
+
if (this._collectionSubscription) {
|
|
74
|
+
this._collectionSubscription.unsubscribe();
|
|
75
|
+
delete this._collectionSubscription;
|
|
76
|
+
}
|
|
77
|
+
console.debug('[ContentfulCollectionController] updating to new collection', collection);
|
|
78
|
+
// update collection
|
|
79
|
+
this._collection = collection;
|
|
80
|
+
// subscribe to collection changes
|
|
81
|
+
if (collection) {
|
|
82
|
+
this._collectionSubscription = collection.events$
|
|
83
|
+
.pipe((0, rxjs_1.filter)(e => {
|
|
84
|
+
// handle collection events
|
|
85
|
+
if (components_1.ICollection.Event.filter(e)) {
|
|
86
|
+
return e.type === 'modified';
|
|
87
|
+
}
|
|
88
|
+
// or item/object/list events
|
|
89
|
+
else if (components_1.Item.Event.filter(e)
|
|
90
|
+
|| components_1.Item.Event.filter(e)
|
|
91
|
+
|| funnel_core_1.ObjectField.Event.filter(e)
|
|
92
|
+
|| funnel_core_1.FieldList.Event.filter(e)) {
|
|
93
|
+
return e.type === 'changed';
|
|
94
|
+
}
|
|
95
|
+
// or field
|
|
96
|
+
else {
|
|
97
|
+
return funnel_core_1.Field.Event.filter(e) && (e.type === 'changed' || e.type === 'reset');
|
|
98
|
+
}
|
|
99
|
+
}), (0, rxjs_1.debounce)(e => {
|
|
100
|
+
if ((components_1.ICollection.Event.filter(e) && e.type === 'modified')
|
|
101
|
+
|| components_1.Item.Event.filter(e)
|
|
102
|
+
|| funnel_core_1.FieldList.Event.filter(e)
|
|
103
|
+
|| (funnel_core_1.Field.Event.filter(e) && e.field.isComposite)) {
|
|
104
|
+
return (0, rxjs_1.interval)(0);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return (0, rxjs_1.interval)(2000);
|
|
108
|
+
}
|
|
109
|
+
}))
|
|
110
|
+
.subscribe(async () => {
|
|
111
|
+
if (collection.modified && this._collection === collection) {
|
|
112
|
+
await this.save(collection);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// raise event
|
|
117
|
+
this.raiseEvent('collection.changed');
|
|
118
|
+
}
|
|
119
|
+
async sync(updatedSys) {
|
|
120
|
+
// skip if there's no active collection/sys
|
|
121
|
+
const { collection, collectionSys, state, collectionRepository } = this;
|
|
122
|
+
if (!collection || !collectionSys) {
|
|
123
|
+
console.warn('[ContentfulCollectionController/sync] ignoring update before initial load');
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// or skip if collection version is unchanged
|
|
127
|
+
else if (collection.id === updatedSys.id && collectionSys.version >= updatedSys.version) {
|
|
128
|
+
console.debug('[ContentfulCollectionController/sync] ignoring update - current version is fresh');
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
// or ignore if booting up
|
|
132
|
+
else if (state === 'uninitialized' || state === 'initializing' || state === 'loading') {
|
|
133
|
+
console.debug('[ContentfulCollectionController/sync] ignoring sync while loading');
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
// or queue if saving
|
|
137
|
+
else if (this.state === 'saving') {
|
|
138
|
+
console.debug('[ContentfulCollectionController/sync] queueing collection sync - updated while saving');
|
|
139
|
+
this._queuedSync = updatedSys;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
// try to sync
|
|
143
|
+
try {
|
|
144
|
+
console.debug('[ContentfulCollectionController/sync] starting sync');
|
|
145
|
+
// update state
|
|
146
|
+
this.state = 'loading';
|
|
147
|
+
// perform sync
|
|
148
|
+
const result = await collectionRepository.sync({ collection, sys: updatedSys });
|
|
149
|
+
// update sys
|
|
150
|
+
this.collectionSys = result.sys;
|
|
151
|
+
// update collection (if unchanged)
|
|
152
|
+
if (this.collection !== result.collection) {
|
|
153
|
+
this.collection = result.collection;
|
|
154
|
+
}
|
|
155
|
+
// update summary (if any)
|
|
156
|
+
if (result.collectionGroup) {
|
|
157
|
+
this.collectionGroup = result.collectionGroup;
|
|
158
|
+
}
|
|
159
|
+
console.debug('[ContentfulCollectionController/sync] sync complete');
|
|
160
|
+
// clear state
|
|
161
|
+
this.state = 'ready';
|
|
162
|
+
}
|
|
163
|
+
// catch error
|
|
164
|
+
catch (e) {
|
|
165
|
+
console.error('[ContentfulCollectionController/sync] sync failed', e);
|
|
166
|
+
this.state = 'error';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
async load() {
|
|
170
|
+
// mark as loading (or initialing if loading for first time)
|
|
171
|
+
this.state = this._state === 'uninitialized'
|
|
172
|
+
? 'initializing'
|
|
173
|
+
: 'loading';
|
|
174
|
+
// try to fetch collection
|
|
175
|
+
try {
|
|
176
|
+
// load collection
|
|
177
|
+
const { collectionGroup, collection, sys } = await this.collectionRepository.load();
|
|
178
|
+
// set collection/group
|
|
179
|
+
this.collectionGroup = collectionGroup;
|
|
180
|
+
this.collection = collection;
|
|
181
|
+
this._collectionSys = sys;
|
|
182
|
+
// update state
|
|
183
|
+
this.state = 'ready';
|
|
184
|
+
}
|
|
185
|
+
// handle load error
|
|
186
|
+
catch (e) {
|
|
187
|
+
console.error('[ContentfulCollectionController] failed to load collection', e);
|
|
188
|
+
// set error state
|
|
189
|
+
this.state = 'error';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
async createLanguage(target) {
|
|
193
|
+
throw new funnel_core_1.NotImplementedError();
|
|
194
|
+
}
|
|
195
|
+
async unpublish() {
|
|
196
|
+
throw new funnel_core_1.NotImplementedError();
|
|
197
|
+
}
|
|
198
|
+
async save(collection) {
|
|
199
|
+
// ignore if not ready
|
|
200
|
+
if (this._state !== 'ready') {
|
|
201
|
+
console.debug(`[ContentfulCollectionController/save] queuing save while in "${this._state}" state`);
|
|
202
|
+
this._queuedSave = collection;
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
// clear save if queued
|
|
206
|
+
delete this._queuedSave;
|
|
207
|
+
// skip if collection isn't modified
|
|
208
|
+
if (!collection.modified) {
|
|
209
|
+
console.debug('[ContentfulCollectionController/save] ignore unmodified collection');
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
// try to save collection
|
|
213
|
+
try {
|
|
214
|
+
console.debug('[ContentfulCollectionController/save] starting save');
|
|
215
|
+
// mark as syncing
|
|
216
|
+
collection.syncing = true;
|
|
217
|
+
// update state
|
|
218
|
+
this.state = 'saving';
|
|
219
|
+
// save page
|
|
220
|
+
this.collection = await this.collectionRepository.save(collection);
|
|
221
|
+
// update state
|
|
222
|
+
this.state = 'ready';
|
|
223
|
+
console.debug('[ContentfulCollectionController/save] save finished');
|
|
224
|
+
}
|
|
225
|
+
// handle error
|
|
226
|
+
catch (e) {
|
|
227
|
+
console.error('[ContentfulCollectionController/save] save failed', e);
|
|
228
|
+
// update state
|
|
229
|
+
this.state = 'error';
|
|
230
|
+
}
|
|
231
|
+
// complete
|
|
232
|
+
finally {
|
|
233
|
+
collection.syncing = false;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
async reload() {
|
|
237
|
+
throw new funnel_core_1.NotImplementedError();
|
|
238
|
+
}
|
|
239
|
+
async processQueues() {
|
|
240
|
+
// try to save (if queued)
|
|
241
|
+
const { _queuedSave, _collection } = this;
|
|
242
|
+
if (_queuedSave) {
|
|
243
|
+
// nuke if collection differs (keep going afterward)
|
|
244
|
+
if (_collection !== _queuedSave) {
|
|
245
|
+
console.debug('[ContentfulCollectionController/processQueues] ignoring queued save for old page');
|
|
246
|
+
delete this._queuedSave;
|
|
247
|
+
}
|
|
248
|
+
// otherwise, try to save
|
|
249
|
+
else {
|
|
250
|
+
console.debug('[ContentfulCollectionController/processQueues] restarting queued save');
|
|
251
|
+
// save
|
|
252
|
+
this.save(_collection).catch(console.error);
|
|
253
|
+
// stop processing
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// try to sync
|
|
258
|
+
const { _queuedSync, _collectionSys } = this;
|
|
259
|
+
if (_queuedSync) {
|
|
260
|
+
// clear sync
|
|
261
|
+
delete this._queuedSync;
|
|
262
|
+
// reload if entity is different
|
|
263
|
+
if (_queuedSync.id !== (_collectionSys === null || _collectionSys === void 0 ? void 0 : _collectionSys.id)) {
|
|
264
|
+
console.debug('[ContentfulCollectionController/processQueues] reloading on entity change');
|
|
265
|
+
this.load().catch(console.error);
|
|
266
|
+
}
|
|
267
|
+
// otherwise, try to sync
|
|
268
|
+
else {
|
|
269
|
+
console.debug('[ContentfulCollectionController/processQueues] retrying sync');
|
|
270
|
+
this.sync(_queuedSync).catch(console.error);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
raiseEvent(type) {
|
|
275
|
+
this._eventBus.publish(components_1.ICollectionController.Event.create({ type, controller: this }));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
exports.ContentfulCollectionController = ContentfulCollectionController;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare function ContentfulCollectionControllerContainer({ children }: ContentfulCollectionControllerContainer.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace ContentfulCollectionControllerContainer {
|
|
4
|
+
type Props = PropsWithChildren;
|
|
5
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentfulCollectionControllerContainer = ContentfulCollectionControllerContainer;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_apps_toolkit_1 = require("@contentful/react-apps-toolkit");
|
|
6
|
+
const components_1 = require("@nascentdigital/funnel-editor/components");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const ContentfulCollectionController_1 = require("./ContentfulCollectionController");
|
|
9
|
+
// container
|
|
10
|
+
function ContentfulCollectionControllerContainer({ children }) {
|
|
11
|
+
// bind context
|
|
12
|
+
const collectionRepository = (0, components_1.useCollectionRepository)();
|
|
13
|
+
const sdk = (0, react_apps_toolkit_1.useSDK)();
|
|
14
|
+
const context = (0, react_1.useMemo)(() => ({
|
|
15
|
+
controller: new ContentfulCollectionController_1.ContentfulCollectionController({ collectionRepository })
|
|
16
|
+
}), [collectionRepository]);
|
|
17
|
+
// list to collection changes
|
|
18
|
+
(0, react_1.useEffect)(() => {
|
|
19
|
+
// get controller
|
|
20
|
+
const { controller } = context;
|
|
21
|
+
// sync on change
|
|
22
|
+
sdk.entry.onSysChanged(sys => {
|
|
23
|
+
controller.sync(sys).catch(console.error);
|
|
24
|
+
});
|
|
25
|
+
}, [sdk, context]);
|
|
26
|
+
// render
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(components_1.CollectionControllerContext.Provider, { value: context, children: children }));
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ContentfulCollectionController"), exports);
|
|
18
|
+
__exportStar(require("./ContentfulCollectionControllerContainer"), exports);
|
|
19
|
+
__exportStar(require("./useContentfulCollectionController"), exports);
|