@clickview/curator 0.0.1

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/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # Curator
2
+
@@ -0,0 +1,9 @@
1
+ import { Core } from 'common';
2
+ import { BaseLayoutViewOptions } from '@clickview/common/dist/common/core/BaseLayoutView';
3
+ export declare class SubjectsApplication extends Core.Application {
4
+ readonly name: string;
5
+ static readonly router: any;
6
+ readonly channelName: string;
7
+ readonly layoutOptions: Core.LayoutOptions<BaseLayoutViewOptions>;
8
+ index(): void;
9
+ }
package/dist/bundle.js ADDED
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("common"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","common","Handlebars"],t):"object"==typeof exports?exports.curator=t(require("React"),require("common"),require("Handlebars")):e.curator=t(e.React,e.common,e.Handlebars)}(window,function(e,t,n){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){var r=n(3);e.exports=(r.default||r).template({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,o){return'<div class="layout-region"></div>'},useData:!0})},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t);var r={CONTENT:"content",POPUP:"popup"},o={CURATOR_LAYOUT:"CuratorLayout"},u={SUBJECTS:"subjects:application"},i=n(0),c=n(1),a=function(e){var t=e.className,n=e.children;return i.createElement("div",{className:t},n)},l=function(e){return i.createElement(a,{className:"content-region right"},e.children)},f=function(e){return i.createElement(a,{className:"popup-region"},e.children)},p=function(e){var t=e.contentChild,n=e.popupChild;return i.createElement(i.Fragment,null,i.createElement(l,null,t),i.createElement(f,null,n))},s=n(2),y=n.n(s);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e,t,n){return(h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=m(this,g(t).call(this,e))).childComponents={},n}var n,u,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(t,c["Core"].LayoutView),n=t,a=[{key:"getCacheKey",value:function(){return o.CURATOR_LAYOUT}}],(u=[{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{contentChild:this.childComponents[r.CONTENT],popupChild:this.childComponents[r.POPUP]}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(r.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){h(g(t.prototype),"showChildView",this).call(this,"layout",i.createElement(p,Object.assign({},this.getChildComponents())))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return y.a}}])&&d(n.prototype,u),a&&d(n,a),t}();function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function S(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){function t(){return j(this,t),S(this,_(t).apply(this,arguments))}return R(t,c["Core"].AppRouter),P(t,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"subjects(/)":"index"}}}]),t}(),T=function(e){function t(){return j(this,t),S(this,_(t).apply(this,arguments))}return R(t,c["Core"].Application),P(t,[{key:"index",value:function(){}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:o.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return E}}]),t}();n.d(t,"LayoutRegions",function(){return r}),n.d(t,"Layouts",function(){return o}),n.d(t,"AppChannels",function(){return u}),n.d(t,"CuratorLayoutView",function(){return v}),n.d(t,"SubjectsApplication",function(){return T})}])});
2
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["file://C:/ClickView Projects/front-end/curator/webpack/universalModuleDefinition","file://C:/ClickView Projects/front-end/curator/webpack/bootstrap","file://C:/ClickView Projects/front-end/curator/external \"React\"","file://C:/ClickView Projects/front-end/curator/external \"common\"","file://C:/ClickView Projects/front-end/curator/src/shared/layouts/CuratorLayout.hbs","file://C:/ClickView Projects/front-end/curator/external \"Handlebars\"","file://C:/ClickView Projects/front-end/curator/src/shared/constants/LayoutRegions.ts","file://C:/ClickView Projects/front-end/curator/src/shared/constants/Layouts.ts","file://C:/ClickView Projects/front-end/curator/src/shared/constants/RadioChannels.ts","file://C:/ClickView Projects/front-end/curator/src/shared/layouts/LayoutComponent.tsx","file://C:/ClickView Projects/front-end/curator/src/shared/layouts/CuratorLayoutView.tsx","file://C:/ClickView Projects/front-end/curator/src/apps/subjects/SubjectsApplication.tsx","file://C:/ClickView Projects/front-end/curator/src/index.ts"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__3__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Handlebars","template","container","depth0","helpers","partials","data","LayoutRegions","CONTENT","POPUP","Layouts","CURATOR_LAYOUT","AppChannels","SUBJECTS","props","className","children","contentChild","popupChild","options","childComponents","LayoutView","layout","el","replaceEl","this","region","renderLayout","unsetRegion","component","getChildComponents","AppRouter","Application"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,UAAWA,QAAQ,eAC7C,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,QAAS,SAAU,cAAeJ,GAChB,iBAAZC,QACdA,QAAiB,QAAID,EAAQG,QAAQ,SAAUA,QAAQ,UAAWA,QAAQ,eAE1EJ,EAAc,QAAIC,EAAQD,EAAY,MAAGA,EAAa,OAAGA,EAAiB,YAR5E,CASGO,OAAQ,SAASC,EAAgCC,EAAgCC,GACpF,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUX,QAGnC,IAAIC,EAASQ,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHb,QAAS,IAUV,OANAc,EAAQH,GAAUI,KAAKd,EAAOD,QAASC,EAAQA,EAAOD,QAASU,GAG/DT,EAAOY,GAAI,EAGJZ,EAAOD,QA0Df,OArDAU,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASlB,EAASmB,EAAMC,GAC3CV,EAAoBW,EAAErB,EAASmB,IAClCG,OAAOC,eAAevB,EAASmB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBg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I,MAAO,yBAFX,kCAUI,OAAOpB,EAAYC,WAVvB,oCAcI,MAAO,CACLtC,KAAMmC,EAAQC,mBAfpB,8BAMI,OAAO,MANX,KCnBA","file":"bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"React\"), require(\"common\"), require(\"Handlebars\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"React\", \"common\", \"Handlebars\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"curator\"] = factory(require(\"React\"), require(\"common\"), require(\"Handlebars\"));\n\telse\n\t\troot[\"curator\"] = factory(root[\"React\"], root[\"common\"], root[\"Handlebars\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__3__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n return \"<div class=\\\"layout-region\\\"></div>\";\n},\"useData\":true});","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","export const LayoutRegions = {\r\n CONTENT: 'content',\r\n POPUP: 'popup'\r\n};","export const Layouts = {\r\n CURATOR_LAYOUT: 'CuratorLayout'\r\n};","export const AppChannels = {\r\n SUBJECTS: 'subjects:application'\r\n};","import * as React from 'react';\r\n\r\ninterface LayoutRegionComponentProps {\r\n className?: string;\r\n}\r\n\r\nconst LayoutRegionComponent = (props: React.PropsWithChildren<LayoutRegionComponentProps>): React.ReactElement => {\r\n const { className, children } = props;\r\n\r\n return (\r\n <div className={className}>\r\n {children}\r\n </div>\r\n );\r\n};\r\n\r\nconst ContentRegionComponent = (props: React.PropsWithChildren<{}>) => (\r\n <LayoutRegionComponent className='content-region right'>\r\n {props.children}\r\n </LayoutRegionComponent>\r\n);\r\n\r\nconst PopupRegionComponent = (props: React.PropsWithChildren<{}>) => (\r\n <LayoutRegionComponent className='popup-region'>\r\n {props.children}\r\n </LayoutRegionComponent>\r\n);\r\n\r\n\r\nexport interface LayoutComponentProps {\r\n contentChild?: React.ReactNode;\r\n popupChild?: React.ReactNode;\r\n}\r\n\r\nexport const LayoutComponent = (props: LayoutComponentProps): React.ReactElement => {\r\n const { contentChild, popupChild } = props;\r\n\r\n\r\n return (\r\n <>\r\n <ContentRegionComponent>\r\n {contentChild}\r\n </ContentRegionComponent>\r\n <PopupRegionComponent>\r\n {popupChild}\r\n </PopupRegionComponent>\r\n </>\r\n );\r\n};","import * as React from 'react';\r\nimport { ObjectHash } from 'backbone';\r\nimport { Core } from 'common';\r\n\r\nimport { Layouts, LayoutRegions } from 'shared/constants';\r\n\r\nimport { LayoutComponent, LayoutComponentProps } from './LayoutComponent';\r\n\r\nimport CuratorLayoutTemplate from './CuratorLayout.hbs';\r\n\r\nexport interface CuratorLayoutViewOptions extends Core.LayoutViewOptions { }\r\n\r\nexport abstract class CuratorLayoutView extends Core.LayoutView {\r\n protected options: CuratorLayoutViewOptions;\r\n protected childComponents: { [index: string]: React.ReactNode} = {};\r\n\r\n constructor(options?: CuratorLayoutViewOptions) {\r\n super(options);\r\n }\r\n\r\n public get title(): boolean {\r\n return false;\r\n }\r\n\r\n public get name(): string {\r\n return 'CuratorLayoutView';\r\n }\r\n\r\n public get template(): any {\r\n return CuratorLayoutTemplate;\r\n }\r\n\r\n public regions(): ObjectHash {\r\n return {\r\n layout: {\r\n el: '.layout-region',\r\n replaceEl: true\r\n }\r\n };\r\n }\r\n\r\n public static getCacheKey(): string {\r\n return Layouts.CURATOR_LAYOUT;\r\n }\r\n\r\n private getChildComponents(): LayoutComponentProps {\r\n return {\r\n contentChild: this.childComponents[LayoutRegions.CONTENT],\r\n popupChild: this.childComponents[LayoutRegions.POPUP]\r\n };\r\n }\r\n\r\n protected unsetRegion(region: string): void {\r\n delete this.childComponents[region];\r\n\r\n this.renderLayout();\r\n }\r\n\r\n public closePopup(): void {\r\n this.unsetRegion(LayoutRegions.POPUP);\r\n }\r\n\r\n public showChildView(region: string, component: React.ReactElement): void {\r\n this.childComponents[region] = component;\r\n\r\n this.renderLayout();\r\n }\r\n\r\n public renderLayout(): void {\r\n super.showChildView('layout', <LayoutComponent {...this.getChildComponents()} />);\r\n }\r\n}","import * as React from 'react';\r\nimport { ObjectHash } from 'backbone';\r\nimport { Core } from 'common';\r\n\r\nimport { AppChannels, Layouts } from 'shared/constants';\r\nimport { BaseLayoutViewOptions } from '@clickview/common/dist/common/core/BaseLayoutView';\r\n\r\nclass SubjectsAppRouter extends Core.AppRouter {\r\n public get channelName(): string {\r\n return AppChannels.SUBJECTS;\r\n }\r\n\r\n protected get appRoutes(): ObjectHash {\r\n return {\r\n 'subjects(/)': 'index'\r\n };\r\n }\r\n}\r\n\r\nexport class SubjectsApplication extends Core.Application {\r\n public get name(): string {\r\n return 'Subjects Application';\r\n }\r\n\r\n public static get router(): any {\r\n return SubjectsAppRouter;\r\n }\r\n\r\n public get channelName(): string {\r\n return AppChannels.SUBJECTS;\r\n }\r\n\r\n public get layoutOptions(): Core.LayoutOptions<BaseLayoutViewOptions> {\r\n return {\r\n name: Layouts.CURATOR_LAYOUT\r\n };\r\n }\r\n\r\n public index(): void {\r\n\r\n }\r\n}","export * from './shared';\r\nexport * from './apps/subjects/SubjectsApplication';"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export * from './shared';
2
+ export * from './apps/subjects/SubjectsApplication';
@@ -0,0 +1,4 @@
1
+ export declare const LayoutRegions: {
2
+ CONTENT: string;
3
+ POPUP: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const Layouts: {
2
+ CURATOR_LAYOUT: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ export declare const AppChannels: {
2
+ SUBJECTS: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ export * from './LayoutRegions';
2
+ export * from './Layouts';
3
+ export * from './RadioChannels';
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './layouts';
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { ObjectHash } from 'backbone';
3
+ import { Core } from 'common';
4
+ export interface CuratorLayoutViewOptions extends Core.LayoutViewOptions {
5
+ }
6
+ export declare abstract class CuratorLayoutView extends Core.LayoutView {
7
+ protected options: CuratorLayoutViewOptions;
8
+ protected childComponents: {
9
+ [index: string]: React.ReactNode;
10
+ };
11
+ constructor(options?: CuratorLayoutViewOptions);
12
+ readonly title: boolean;
13
+ readonly name: string;
14
+ readonly template: any;
15
+ regions(): ObjectHash;
16
+ static getCacheKey(): string;
17
+ private getChildComponents;
18
+ protected unsetRegion(region: string): void;
19
+ closePopup(): void;
20
+ showChildView(region: string, component: React.ReactElement): void;
21
+ renderLayout(): void;
22
+ }
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export interface LayoutComponentProps {
3
+ contentChild?: React.ReactNode;
4
+ popupChild?: React.ReactNode;
5
+ }
6
+ export declare const LayoutComponent: (props: LayoutComponentProps) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
@@ -0,0 +1 @@
1
+ export * from './CuratorLayoutView';
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@clickview/curator",
3
+ "version": "0.0.1",
4
+ "description": "curator",
5
+ "main": "dist/bundle.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "start": "set NODE_ENV=development&& webpack -w --config ./tooling/webpack.config.js",
9
+ "build": "set NODE_ENV=production&& webpack --config ./tooling/webpack.config.js"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "http://gitlab.cvinternal.net/front-end/curator.git"
14
+ },
15
+ "cv": {
16
+ "publishable": true,
17
+ "rebuildable": true
18
+ },
19
+ "author": "Matt Trengrove",
20
+ "license": "ISC",
21
+ "devDependencies": {
22
+ "@clickview/tooling": "0.0.4"
23
+ },
24
+ "dependencies": {
25
+ "@clickview/common": "0.1.4"
26
+ },
27
+ "babel": {
28
+ "presets": [
29
+ [
30
+ "@babel/preset-env",
31
+ {
32
+ "corejs": 2,
33
+ "useBuiltIns": "entry"
34
+ }
35
+ ]
36
+ ]
37
+ }
38
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ *
3
+ * Webpack externals helper
4
+ *
5
+ * Ensures that any import statements within our code for modules that are globally scoped
6
+ * will be correctly resolved against that namespace. More specifically, they don't need to
7
+ * be case sensitive.
8
+ *
9
+ * @example
10
+ * import { View } from 'marionette';
11
+ * import { View } from 'Marionette';
12
+ *
13
+ * All the above statements will be correctly mapped to 'Marionette' when bundled.
14
+ */
15
+
16
+ const externalModules = {
17
+ '$': /^(jquery|\$)$/i,
18
+ '_': [ /^underscore$/i, /^_$/i ],
19
+ 'Backbone': /^backbone$/i,
20
+ 'Marionette': [ /^backbone\.marionette$/i, /^marionette$/i ],
21
+ 'Handlebars': /^handlebars$/i,
22
+ 'Bootstrap': /^bootstrap$/i,
23
+ 'Backbone.Radio': /^backbone\.radio$/i,
24
+ 'Backbone.Validation': /^backbone\.validation$/i,
25
+ 'CVEvents': /^cvevents$/i,
26
+ 'Bloodhound': /^bloodhound$/i,
27
+ 'FontAwesome': /fontawesome$/i,
28
+ 'moment': /^moment$/i,
29
+ 'ClipboardJS': /^clipboard$/i,
30
+ 'signalR': /signalr$/i,
31
+ 'CVLanguages': /^CVLanguages$/i,
32
+ 'autotrack': /^autotrack$/i,
33
+ 'docCookies': /^docCookies$/i,
34
+ 'linkifyjs': /^linkifyjs$/i,
35
+ 'Polyglot': /^polyglot$/i,
36
+ 'common': /^common$/i,
37
+ 'React': /^react$/i,
38
+ 'ReactDOM': [ /^react-dom$/i, /^ReactDOM$/i ],
39
+ 'ReactBootstrap': /^react-bootstrap$/i,
40
+ 'SortableHOC': /^react-sortable-hoc$/i,
41
+ 'ReactTransitionGroup': /^react-transition-group$/i,
42
+ 'ReactIntersectionObserver': /^react-intersection-observer$/i,
43
+ 'Formik': /^formik$/i,
44
+ };
45
+
46
+ exports.mapExternalModules = (context, request, callback) => {
47
+ for(var key in externalModules) {
48
+ if(!externalModules.hasOwnProperty(key))
49
+ continue;
50
+
51
+ let arr = externalModules[key];
52
+
53
+ if(!Array.isArray(arr))
54
+ arr = [arr];
55
+
56
+ for(var i = 0; i < arr.length; i++) {
57
+ if(arr[i].test(request))
58
+ return callback(null, key)
59
+ }
60
+ }
61
+
62
+ callback();
63
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Define our templates as a module so that we can use
3
+ * import statements just the same as we do for other
4
+ * ts/js code.
5
+ */
6
+ declare module '*.handlebars';
7
+ declare module '*.hbs';
8
+ declare module '*.scss';
9
+ declare module '*.svg';