dry-suite 1.13.2 → 1.14.0
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/umd/dry-suite.js
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={645:()=>{!function(e){function t(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof e.CustomEvent&&(t.prototype=e.Event.prototype,e.CustomEvent=t)}(window)}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{function e(e){return(e.charAt(0)+e.slice(1).replace(/([A-Z])/g,"-$&")).toLowerCase()}n.r(o),n.d(o,{createSetupElement:()=>h,generateCustomElementWrapper:()=>p,makeGenericEffectsDriver:()=>v});var t=1e3;function r(){return t++}const a=require("rxjs"),i=require("maybe-not");function c(t){var n=("name",t.reduce((function(e,t){return e.set(t.name,t),e}),new Map));return{fnHashByName:n,hooks:{init:function(e){e.__innerProps$=new a.BehaviorSubject({})},connectedCallback:function(e){var t,o,r,a,c,s=e.__innerProps$.getValue(),l=Object.assign({},s);e.constructor.observedAttributes.forEach((function(t){null!==e.getAttribute(t)&&u(e,t,e.getAttribute(t),i.Maybe.just(n),l)})),t=s,o=l,r=!0,a=Object.keys(t),c=Object.keys(o),a.length===c.length&&(a.forEach((function(e){o.hasOwnProperty(e)&&t[e]===o[e]||(r=!1)})),r)||e.__innerProps$.next(l)},classSetup:function(n){Object.assign(n,{observedAttributes:t.filter((function(e){return e.reflectAs})).map((function(e){return e.name})).map(e)}),t.forEach((function(t){Object.defineProperty(n.prototype,t.name,{get:function(){return this.__innerProps$.getValue()[t.name]},set:function(o){if(this.__innerProps$.getValue()[t.name]!==o){var r=e(t.name),a=n.observedAttributes.includes(r);a&&(!0===o?this.setAttribute(r,""):o||0===o||""===o?this.setAttribute(r,String(o)):this.removeAttribute(r)),!this.__attached&&a&&!1!==o||(this.__innerProps$.getValue()[t.name]=o,this.__innerProps$.next(this.__innerProps$.getValue()))}}})}))}}}}function u(e,t,n,o,r){var a=t.replace(/-([a-z])/gi,(function(e,t){return t.toUpperCase()}));e[a]=o.map((function(e){var t=e.get(a),o=n;return t&&t.reflectAs&&n&&(o=t.reflectAs(n)),t&&t.reflectAs===Boolean&&(o=""===n),r&&(r[a]=o),o})).withDefault(n)}function s(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=!!window.HTMLTemplateElement;return t=o?f(n):l(n),function(e){if(e.shadowRoot)return e.shadowRoot.querySelector("div");e.attachShadow?e.attachShadow({mode:"open"}):Object.assign(e,{shadowRoot:e});var r=document.importNode(t,!0);o||(r.querySelector("style").sheet.cssText=n);var a=e.shadowRoot;return a.appendChild(r),a.querySelector("div")}}function l(e){var t=document.createDocumentFragment(),n=document.createElement("style");n.appendChild(document.createTextNode(e));var o=document.createElement("div");return o.className="root",t.appendChild(n),t.appendChild(o),t}function f(e){var t=document.createElement("template");return t.innerHTML="<style>".concat(e,'</style><div class="root"></div>'),t.content}const d=require("rxjs/operators");function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{useShadowDOM:!0},o=n.useShadowDOM?i.Maybe.just(s(e,n.css)):i.Maybe.nothing(),a=Array.isArray(n.props)?i.Maybe.just(c(n.props)):i.Maybe.nothing(),l=function e(){var c=Reflect.construct(HTMLElement,[],e);return n.prototypeExtensions&&Object.keys(n.prototypeExtensions).forEach((function(e){c[e]||(c[e]=n.prototypeExtensions[e])})),c.__onTeardown=[],c.__onAttached=[],c.__guid=r(),a.map((function(e){return(0,e.hooks.init)(c)})),o.map((function(e){return e(c)})).map((function(e){var n=i.Maybe.maybe(c.__innerProps$).map((function(e){return t(c,e)})).withDefaultFn((function(){return t(c)}));m(c,e,n),c.__shadowAppBooted=!0})),c};return b(l),l.prototype=Object.create(HTMLElement.prototype,{component:{writable:!0,enumerable:!0},constructor:{value:l},connectedCallback:{writable:!0,value:function(){var e=this;this.dataset.guid="".concat(this.__guid),n.useShadowDOM&&this.__shadowAppBooted||(o.map((function(t){return t(e)})).alt(i.Maybe.just(this)).map((function(n){var o=i.Maybe.maybe(e.__innerProps$).map((function(n){return t(e,n)})).withDefaultFn((function(){return t(e)}));m(e,n,o)})),this.__shadowAppBooted=!0),a.map((function(t){(0,t.hooks.connectedCallback)(e)})),this.__attached=!0,this.__onAttached.forEach((function(t){return t.call(e)}))}},disconnectedCallback:{writable:!0,value:function(){var e=this;this.__onTeardown.reverse().forEach((function(t){return t.call(e)})),this.__onTeardown=[],this.__onAttached=[],this.__attached=!1,this.__shadowAppBooted=!1}},attributeChangedCallback:{writable:!0,value:function(e,t,n){t!==n&&this.__attached&&u(this,e,n,a.map((function(e){return e.fnHashByName})))}}}),a.map((function(e){return(0,e.hooks.classSetup)(l)})),l}function h(e){return function(t){return function(n){var o=function(){window.customElements.get(n)||window.customElements.define(n,e(n,t))};window.customElements?o():(0,a.interval)(5).pipe((0,d.filter)((function(){return!!window.customElements})),(0,d.take)(1)).toPromise().then((function(){o()}))}}}function m(e,t,n){var o=document.createElement("div");t.appendChild(o);var r=n.DOM$.subscribe((function(e){t.replaceChild(e,t.firstChild)})),a=n.settled$.subscribe((function(t){e.settled=t,t&&e.dispatchEvent(new CustomEvent("settled"))})),i=n.teardown$.subscribe((function(t){e.__onTeardown.push(t)}));e.__onTeardown.push((function(){[r,a,i].forEach((function(e){return e.unsubscribe()}))}))}function b(e){try{Object.defineProperty(e,"is",{value:name,writable:!1}),Object.defineProperty(e,"localName",{value:name,writable:!1})}catch(e){}}function v(e){return function(t){t.subscribe({next:function(t){t(e)},error:function(){},complete:function(){}})}}n(645)})(),o})()));
|
2
|
-
//# sourceMappingURL=dry-suite.js.map
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(()=>(()=>{"use strict";var e={645:()=>{!function(e){function t(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof e.CustomEvent&&(t.prototype=e.Event.prototype,e.CustomEvent=t)}(window)}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{function e(e){return(e.charAt(0)+e.slice(1).replace(/([A-Z])/g,"-$&")).toLowerCase()}n.r(o),n.d(o,{createSetupElement:()=>h,generateCustomElementWrapper:()=>p,makeGenericEffectsDriver:()=>v});var t=1e3;function r(){return t++}const a=require("rxjs"),i=require("maybe-not");function c(t){var n=("name",t.reduce((function(e,t){return e.set(t.name,t),e}),new Map));return{fnHashByName:n,hooks:{init:function(e){e.__innerProps$=new a.BehaviorSubject({})},connectedCallback:function(e){var t,o,r,a,c,s=e.__innerProps$.getValue(),l=Object.assign({},s);e.constructor.observedAttributes.forEach((function(t){null!==e.getAttribute(t)&&u(e,t,e.getAttribute(t),i.Maybe.just(n),l)})),t=s,o=l,r=!0,a=Object.keys(t),c=Object.keys(o),a.length===c.length&&(a.forEach((function(e){o.hasOwnProperty(e)&&t[e]===o[e]||(r=!1)})),r)||e.__innerProps$.next(l)},classSetup:function(n){Object.assign(n,{observedAttributes:t.filter((function(e){return e.reflectAs})).map((function(e){return e.name})).map(e)}),t.forEach((function(t){Object.defineProperty(n.prototype,t.name,{get:function(){return this.__innerProps$.getValue()[t.name]},set:function(o){if(this.__innerProps$.getValue()[t.name]!==o){var r=e(t.name),a=n.observedAttributes.includes(r);a&&(!0===o?this.setAttribute(r,""):o||0===o||""===o?this.setAttribute(r,String(o)):this.removeAttribute(r)),!this.__attached&&a&&!1!==o||(this.__innerProps$.getValue()[t.name]=o,this.__innerProps$.next(this.__innerProps$.getValue()))}}})}))}}}}function u(e,t,n,o,r){var a=t.replace(/-([a-z])/gi,(function(e,t){return t.toUpperCase()}));e[a]=o.map((function(e){var t=e.get(a),o=n;return t&&t.reflectAs&&n&&(o=t.reflectAs(n)),t&&t.reflectAs===Boolean&&(o=""===n),r&&(r[a]=o),o})).withDefault(n)}function s(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=!!window.HTMLTemplateElement;return t=o?f(n):l(n),function(e){if(e.shadowRoot)return e.shadowRoot.querySelector("div");e.attachShadow?e.attachShadow({mode:"open"}):Object.assign(e,{shadowRoot:e});var r=document.importNode(t,!0);o||(r.querySelector("style").sheet.cssText=n);var a=e.shadowRoot;return a.appendChild(r),a.querySelector("div")}}function l(e){var t=document.createDocumentFragment(),n=document.createElement("style");n.appendChild(document.createTextNode(e));var o=document.createElement("div");return o.className="root",t.appendChild(n),t.appendChild(o),t}function f(e){var t=document.createElement("template");return t.innerHTML="<style>".concat(e,'</style><div class="root"></div>'),t.content}const d=require("rxjs/operators");function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{useShadowDOM:!0},o=n.useShadowDOM?i.Maybe.just(s(e,n.css)):i.Maybe.nothing(),a=Array.isArray(n.props)?i.Maybe.just(c(n.props)):i.Maybe.nothing(),l=function e(){var c=Reflect.construct(HTMLElement,[],e);return n.prototypeExtensions&&Object.keys(n.prototypeExtensions).forEach((function(e){c[e]||(c[e]=n.prototypeExtensions[e])})),c.__onTeardown=[],c.__onAttached=[],c.__guid=r(),a.map((function(e){return(0,e.hooks.init)(c)})),o.map((function(e){return e(c)})).map((function(e){var n=i.Maybe.maybe(c.__innerProps$).map((function(e){return t(c,e)})).withDefaultFn((function(){return t(c)}));m(c,e,n),c.__shadowAppBooted=!0})),c};return b(l),l.prototype=Object.create(HTMLElement.prototype,{component:{writable:!0,enumerable:!0},constructor:{value:l},connectedCallback:{writable:!0,value:function(){var e=this;this.dataset.guid="".concat(this.__guid),n.useShadowDOM&&this.__shadowAppBooted||(o.map((function(t){return t(e)})).alt(i.Maybe.just(this)).map((function(n){var o=i.Maybe.maybe(e.__innerProps$).map((function(n){return t(e,n)})).withDefaultFn((function(){return t(e)}));m(e,n,o)})),this.__shadowAppBooted=!0),a.map((function(t){(0,t.hooks.connectedCallback)(e)})),this.__attached=!0,this.__onAttached.forEach((function(t){return t.call(e)}))}},disconnectedCallback:{writable:!0,value:function(){var e=this;this.__onTeardown.reverse().forEach((function(t){return t.call(e)})),this.__onTeardown=[],this.__onAttached=[],this.__attached=!1,this.__shadowAppBooted=!1}},attributeChangedCallback:{writable:!0,value:function(e,t,n){t!==n&&this.__attached&&u(this,e,n,a.map((function(e){return e.fnHashByName})))}}}),a.map((function(e){return(0,e.hooks.classSetup)(l)})),l}function h(e){return function(t){return function(n){var o=function(){window.customElements.get(n)||window.customElements.define(n,e(n,t))};window.customElements?o():(0,a.interval)(5).pipe((0,d.filter)((function(){return!!window.customElements})),(0,d.take)(1)).toPromise().then((function(){o()}))}}}function m(e,t,n){var o=document.createElement("div");t.appendChild(o);var r=n.DOM$.subscribe((function(e){t.replaceChild(e,t.firstChild)})),a=n.settled$.subscribe((function(t){e.settled=t,t&&e.dispatchEvent(new CustomEvent("settled"))})),i=n.teardown$.subscribe((function(t){e.__onTeardown.push(t)}));e.__onTeardown.push((function(){[r,a,i].forEach((function(e){return e.unsubscribe()}))}))}function b(e){try{Object.defineProperty(e,"is",{value:name,writable:!1}),Object.defineProperty(e,"localName",{value:name,writable:!1})}catch(e){}}function v(e){return function(t){t.subscribe({next:function(t){t(e)},error:function(){},complete:function(){}})}}n(645)})(),o})()));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "dry-suite",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.14.0",
|
4
4
|
"description": "Factory with plugin architecture for embedding anything in custom elements.",
|
5
5
|
"main": "./dist/umd/dry-suite.js",
|
6
6
|
"types": "./dist/types/dry-suite.d.ts",
|
@@ -33,5 +33,5 @@
|
|
33
33
|
"tslint": "~6.0.0",
|
34
34
|
"tslint-config-prettier": "~1.18.0"
|
35
35
|
},
|
36
|
-
"gitHead": "
|
36
|
+
"gitHead": "f2a968e8cc50e54ffeaeebf85911ffb0e42ea0ce"
|
37
37
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"dry-suite.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,MAAM,I,oCCRT,SAAWC,GAGT,SAASC,EAAYC,EAAeC,GAClCA,EAASA,GAAU,CAAEC,SAAS,EAAOC,YAAY,EAAOC,YAAQC,GAChE,IAAIC,EAAMC,SAASC,YAAY,eAE/B,OADAF,EA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AOuK,eACVD,KAI6BE,EAAAA,EAAAA,UAAS,GACpCC,MACG3F,EAAAA,EAAAA,SAAO,mBAAQ9E,OAAOuK,mBACtBG,EAAAA,EAAAA,MAAK,IAERC,YAEuBC,MAAK,WACzBN,SAMhB,SAASlB,EACP/F,EACA9D,EACA0J,GAEA,IAAM4B,EAAcpK,SAASiH,cAAc,OAG3CnI,EAAKgI,YAAYsD,GAEjB,IAAMC,EAAkB7B,EAAc8B,KAAKC,WAAU,SAAAC,GACnD1L,EAAK2L,aAAaD,EAAY1L,EAAK4L,eAG/BC,EAAsBnC,EAAcoC,SAASL,WAAU,SAAAM,GAC3DjI,EAAQiI,QAAUA,EAEdA,GACFjI,EAAQkI,cAAc,IAAItL,YAAY,eAIpCuL,EAAuBvC,EAAcwC,UAAUT,WAAU,SAAAU,GAC7DrI,EAAQwF,aAAa8C,KAAKD,MAG5BrI,EAAQwF,aAAa8C,MAAK,WACxB,CAACb,EAAiBM,EAAqBI,GAAsBrH,SAAQ,SAAAyH,GAAC,OACpEA,EAAEC,oBAKR,SAASvC,EAA2B1E,GAClC,IAEErD,OAAOC,eAAeoD,EAAY,KAAM,CAAE1C,MAAOgD,KAAMuE,UAAU,IACjElI,OAAOC,eAAeoD,EAAY,YAAa,CAC7C1C,MAAOgD,KACPuE,UAAU,IAEZ,MAAOqC,KC5NL,SAAUC,EAAyBnG,GACrC,OAAO,SAACoG,GACJA,EAAQhB,UAAU,CACdtG,KADc,SACTuH,GACDA,EAAOrG,IAEXkG,MAJc,aAOdI,SAPc,gB","sources":["webpack://dry-suite/webpack/universalModuleDefinition","webpack://dry-suite/./src/parse-first.ts","webpack://dry-suite/webpack/bootstrap","webpack://dry-suite/webpack/runtime/define property getters","webpack://dry-suite/webpack/runtime/hasOwnProperty shorthand","webpack://dry-suite/webpack/runtime/make namespace object","webpack://dry-suite/./src/utility/helpers.ts","webpack://dry-suite/external commonjs \"rxjs\"","webpack://dry-suite/external commonjs \"maybe-not\"","webpack://dry-suite/./src/core/element-feature-adaptors/props.ts","webpack://dry-suite/./src/core/element-feature-adaptors/shadow-dom.ts","webpack://dry-suite/external commonjs \"rxjs/operators\"","webpack://dry-suite/./src/core/base-element-factory.ts","webpack://dry-suite/./src/drivers/generic-effects-driver.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, () => {\nreturn ","// CUSTOM EVENT POLYFILL FOR IE 11\n(function (window: any) {\n if (typeof window.CustomEvent === \"function\") return;\n\n function CustomEvent(event: string, params: any) {\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n\n CustomEvent.prototype = window.Event.prototype;\n\n window.CustomEvent = CustomEvent;\n})(window);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Dict } from './../core/core-types';\n\nexport function toCamelCase(str: string): string {\n return str.replace(/-([a-z])/gi, ($0, $1) => $1.toUpperCase());\n}\n\nexport function toDashCase(str: string): string {\n return (str.charAt(0) + str.slice(1).replace(/([A-Z])/g, '-$&')\n ).toLowerCase();\n}\n\nexport function indexBy<K extends keyof O, O>(key: K, arr: O[]): Map<O[K], O> {\n return arr.reduce((indexed, obj) => {\n indexed.set(obj[key], obj);\n return indexed;\n }, new Map());\n}\n\nlet elementGuid: number = 1000;\n\nexport function createGuid(length : number = 4): number {\n return elementGuid++;\n}\n\nexport function pick(props: string[], obj: { [key: string]: any }): { [key: string]: any } {\n return props.reduce((memo, prop) => {\n if (prop in obj) {\n return {\n ...memo,\n [prop]: obj[prop]\n };\n }\n\n return memo;\n }, {}) as any;\n}\n\nexport function objectsAreEqual(obj1: Dict<any>, obj2: Dict<any>): boolean {\n let equal = true;\n const obj1Keys = Object.keys(obj1);\n const obj2Keys = Object.keys(obj2);\n\n if (obj1Keys.length !== obj2Keys.length) {\n return false;\n }\n\n obj1Keys.forEach(key => {\n if (!obj2.hasOwnProperty(key) || obj1[key] !== obj2[key]) {\n equal = false;\n }\n });\n\n return equal;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"rxjs\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"maybe-not\");","import {\r\n ObservedProperty,\r\n Dict,\r\n DSElementSetupHooks,\r\n DSCustomElement,\r\n ConstructorWithAttributes,\r\n} from '../core-types';\r\nimport { indexBy, toDashCase, toCamelCase, objectsAreEqual } from '../../utility/helpers';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { Maybe } from 'maybe-not';\r\n\r\nexport function enableProps(\r\n props: ObservedProperty[]\r\n): { fnHashByName: Dict<any>; hooks: DSElementSetupHooks } {\r\n const fnHashByName = indexBy('name', props);\r\n return {\r\n fnHashByName,\r\n hooks: {\r\n init(element: DSCustomElement): void {\r\n element.__innerProps$ = new BehaviorSubject({});\r\n },\r\n connectedCallback(element: DSCustomElement): void {\r\n const initialProps = element.__innerProps$!.getValue();\r\n let updatedProps: Dict<any> = { ...initialProps };\r\n element.constructor.observedAttributes!.forEach(attrName => {\r\n /* set all observed attrs as properties on connect\r\n as initial values do not trigger attribute changed callback\r\n attrs set properties which proxy property behavior subject */\r\n if (element.getAttribute(attrName) === null) {\r\n return;\r\n }\r\n\r\n setPropFromAttr(\r\n element,\r\n attrName,\r\n element.getAttribute(attrName),\r\n Maybe.just(fnHashByName),\r\n updatedProps\r\n );\r\n });\r\n\r\n if (!objectsAreEqual(initialProps, updatedProps)) {\r\n element.__innerProps$!.next(updatedProps);\r\n }\r\n },\r\n classSetup(\r\n ConstructF: (() => DSCustomElement & { observedAttributes?: string[] })\r\n ): void {\r\n Object.assign(ConstructF, {\r\n observedAttributes: props\r\n .filter(x => x.reflectAs)\r\n .map(x => x.name)\r\n .map(toDashCase),\r\n });\r\n\r\n props.forEach((prop: ObservedProperty) => {\r\n Object.defineProperty(ConstructF.prototype, prop.name, {\r\n get(this: DSCustomElement): any {\r\n return this.__innerProps$!.getValue()[prop.name];\r\n },\r\n set(this: DSCustomElement, val: any): void {\r\n if (this.__innerProps$!.getValue()[prop.name] === val) {\r\n return;\r\n }\r\n\r\n const dashedName = toDashCase(prop.name);\r\n\r\n const observed = (ConstructF as ConstructorWithAttributes).observedAttributes!.includes(\r\n dashedName);\r\n if (observed) {\r\n if (val === true) {\r\n this.setAttribute(dashedName, '');\r\n } else if (val || val === 0 || val === '') {\r\n this.setAttribute(dashedName, String(val));\r\n } else {\r\n this.removeAttribute(dashedName);\r\n }\r\n }\r\n\r\n if (this.__attached || !observed || val === false) {\r\n // emit props$ event after each set\r\n this.__innerProps$!.getValue()[prop.name] = val;\r\n this.__innerProps$!.next(this.__innerProps$!.getValue());\r\n }\r\n },\r\n });\r\n });\r\n },\r\n },\r\n };\r\n}\r\n\r\nexport function setPropFromAttr(\r\n customElement: DSCustomElement,\r\n attrName: string,\r\n attrValue: any,\r\n mFnHashByName: Maybe<Dict<any>>,\r\n propInitializer?: Dict<any>\r\n): void {\r\n const camelName = toCamelCase(attrName);\r\n\r\n customElement[camelName] = mFnHashByName\r\n .map(fnHashByName => {\r\n const propConfig = fnHashByName.get(camelName);\r\n let propValue = attrValue;\r\n\r\n if (propConfig && propConfig.reflectAs && attrValue) {\r\n propValue = propConfig.reflectAs(attrValue);\r\n }\r\n if (propConfig && propConfig.reflectAs === Boolean) {\r\n // boolean attributes use empty string as true\r\n propValue = attrValue === '';\r\n }\r\n \r\n if (propInitializer) {\r\n propInitializer[camelName] = propValue;\r\n }\r\n\r\n return propValue;\r\n })\r\n .withDefault(attrValue);\r\n}\r\n","import { DSCustomElement } from \"../core-types\";\r\n\r\nexport function setupShadowDOM(\r\n dashedName: string,\r\n css: string = ''\r\n): (element: DSCustomElement) => HTMLElement {\r\n let fragment: DocumentFragment;\r\n\r\n const canTemplate = !!window.HTMLTemplateElement;\r\n if (canTemplate) {\r\n fragment = generateCustomElementTemplate(css);\r\n } else {\r\n fragment = generateCustomElementFragment(css);\r\n }\r\n\r\n return function (element: DSCustomElement): HTMLElement {\r\n if (element.shadowRoot) {\r\n return element.shadowRoot.querySelector('div')!;\r\n }\r\n \r\n if (element.attachShadow) {\r\n element.attachShadow({ mode: 'open' });\r\n } else {\r\n Object.assign(element, {shadowRoot: element});\r\n }\r\n\r\n const shadowContent = document.importNode(fragment, true);\r\n\r\n if (!canTemplate) {\r\n const styleTag = shadowContent.querySelector('style');\r\n (styleTag as any).sheet.cssText = css;\r\n }\r\n\r\n const shadowRoot = element.shadowRoot!;\r\n shadowRoot.appendChild(shadowContent);\r\n const wrappingDiv = shadowRoot.querySelector('div')!;\r\n\r\n return wrappingDiv;\r\n }\r\n}\r\n\r\nfunction generateCustomElementFragment(css: string): DocumentFragment {\r\n const fragment = document.createDocumentFragment();\r\n \r\n const styleTag = document.createElement('style');\r\n styleTag.appendChild(document.createTextNode(css));\r\n\r\n const rootDiv = document.createElement('div');\r\n rootDiv.className = 'root';\r\n\r\n fragment.appendChild(styleTag);\r\n fragment.appendChild(rootDiv);\r\n\r\n return fragment;\r\n}\r\n\r\nfunction generateCustomElementTemplate(css: string): DocumentFragment {\r\n const template = document.createElement('template');\r\n template.innerHTML = `<style>${css}</style><div class=\"root\"></div>`;\r\n\r\n return template.content;\r\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"rxjs/operators\");","import {\r\n DrySuiteEngine,\r\n ObservedProperty,\r\n DSCustomElement,\r\n Dict,\r\n DSElementSetupHooks,\r\n DSElementFactory,\r\n DSElementConstructor,\r\n EngineStreams,\r\n} from './core-types';\r\nimport { enableProps, setPropFromAttr } from './element-feature-adaptors/props';\r\nimport { setupShadowDOM } from './element-feature-adaptors/shadow-dom';\r\nimport { Maybe } from 'maybe-not';\r\nimport { createGuid } from '../utility/helpers';\r\nimport { interval } from 'rxjs';\r\nimport { filter, take } from 'rxjs/operators';\r\n\r\nexport function generateCustomElementWrapper<Props>(\r\n name: string,\r\n engine: DrySuiteEngine,\r\n options: {\r\n useShadowDOM: boolean;\r\n props?: ObservedProperty[];\r\n css?: string;\r\n prototypeExtensions?: Dict<any>;\r\n } = {\r\n useShadowDOM: true,\r\n }\r\n): DSElementConstructor {\r\n const getShadowBaseElementM: Maybe<\r\n (element: DSCustomElement) => HTMLElement\r\n > = options.useShadowDOM\r\n ? Maybe.just(setupShadowDOM(name, options.css))\r\n : Maybe.nothing();\r\n const propsSetup = Array.isArray(options.props)\r\n ? Maybe.just(enableProps(options.props))\r\n : Maybe.nothing<{ fnHashByName: Dict<any>; hooks: DSElementSetupHooks }>();\r\n\r\n const ConstructF = function(): DSCustomElement {\r\n const self: DSCustomElement = Reflect.construct(\r\n HTMLElement,\r\n [],\r\n ConstructF\r\n );\r\n\r\n if (options.prototypeExtensions) {\r\n Object.keys(options.prototypeExtensions).forEach((key) => {\r\n if (!self[key]) {\r\n self[key] = options.prototypeExtensions![key];\r\n }\r\n });\r\n }\r\n\r\n self.__onTeardown = [];\r\n self.__onAttached = [];\r\n self.__guid = createGuid();\r\n\r\n // if properties are enabled it sets __innerProps$\r\n propsSetup.map(({ hooks: { init } }) => init(self));\r\n\r\n // if we are using shadow dom go ahead an initialize app via engine\r\n // hand the engine streams that is populated with attributes once element is connected\r\n\r\n getShadowBaseElementM.map(fn => fn(self)).map(root => {\r\n const engineStreams = Maybe.maybe(self.__innerProps$)\r\n .map(props$ => engine(self, props$))\r\n .withDefaultFn(() => engine(self));\r\n\r\n handleEngineStreams(self, root, engineStreams);\r\n\r\n self.__shadowAppBooted = true;\r\n });\r\n\r\n return self;\r\n };\r\n\r\n tryAssigningNameProperties(ConstructF);\r\n\r\n //setup prototype methods\r\n ConstructF.prototype = Object.create(HTMLElement.prototype, {\r\n component: {\r\n writable: true,\r\n enumerable: true,\r\n },\r\n constructor: { value: ConstructF },\r\n connectedCallback: {\r\n writable: true,\r\n value: function(this: DSCustomElement): void {\r\n this.dataset.guid = `${this.__guid}`;\r\n if (!options.useShadowDOM || !this.__shadowAppBooted) {\r\n getShadowBaseElementM\r\n .map(fn => fn(this))\r\n .alt(Maybe.just(this))\r\n .map(root => {\r\n const engineStreams = Maybe.maybe(this.__innerProps$)\r\n .map(props$ => engine(this, props$))\r\n .withDefaultFn(() => engine(this));\r\n\r\n handleEngineStreams(this, root, engineStreams);\r\n });\r\n\r\n this.__shadowAppBooted = true;\r\n }\r\n\r\n propsSetup.map(({ hooks: { connectedCallback } }) => {\r\n connectedCallback(this);\r\n });\r\n\r\n this.__attached = true;\r\n this.__onAttached.forEach(fn => fn.call(this));\r\n }\r\n },\r\n disconnectedCallback: {\r\n writable: true,\r\n value: function(this: DSCustomElement): void {\r\n this.__onTeardown.reverse().forEach(fn => fn.call(this));\r\n this.__onTeardown = [];\r\n this.__onAttached = [];\r\n this.__attached = false;\r\n this.__shadowAppBooted = false;\r\n },\r\n },\r\n attributeChangedCallback: {\r\n writable: true,\r\n value: function(\r\n this: DSCustomElement,\r\n attrName: string,\r\n oldVal: any,\r\n newVal: any\r\n ): void {\r\n if (oldVal === newVal || !this.__attached) {\r\n return;\r\n }\r\n\r\n /* All observed attributes are Drysuite properties\r\n it sets the property which triggers the proxy property behavior subject */\r\n setPropFromAttr(\r\n this,\r\n attrName,\r\n newVal,\r\n propsSetup.map(propsSetup => propsSetup.fnHashByName)\r\n );\r\n },\r\n }\r\n});\r\n\r\n // NEEDS TO HAPPEN AFTER OBJECT.CREATE SETS PROTOTYPE\r\n propsSetup.map(({ hooks: { classSetup } }) => classSetup(ConstructF));\r\n\r\n return ConstructF as DSElementConstructor;\r\n}\r\n\r\nexport function createSetupElement<T>(\r\n elementConstructor: DSElementFactory<T>\r\n): (elementOptions: T) => (elementName: string) => void {\r\n return (elementOptions): ((elementName: string) => void) => {\r\n return (elementName: string) => {\r\n const defineElement = () => {\r\n window.customElements.get(elementName) ||\r\n window.customElements.define(\r\n elementName,\r\n elementConstructor(elementName, elementOptions)\r\n );\r\n }\r\n\r\n if (!!window.customElements) {\r\n defineElement();\r\n return;\r\n }\r\n\r\n const whenCustomElementsReady = interval(5)\r\n .pipe(\r\n filter(() => !!window.customElements),\r\n take(1)\r\n )\r\n .toPromise();\r\n\r\n whenCustomElementsReady.then(() => {\r\n defineElement();\r\n });\r\n };\r\n };\r\n}\r\n\r\nfunction handleEngineStreams(\r\n element: DSCustomElement,\r\n root: HTMLElement,\r\n engineStreams: EngineStreams\r\n): void {\r\n const placeholder = document.createElement('div');\r\n\r\n // this will be replaced\r\n root.appendChild(placeholder);\r\n\r\n const domSubscription = engineStreams.DOM$.subscribe(newElement => {\r\n root.replaceChild(newElement, root.firstChild!);\r\n });\r\n\r\n const settledSubscription = engineStreams.settled$.subscribe(settled => {\r\n element.settled = settled;\r\n\r\n if (settled) {\r\n element.dispatchEvent(new CustomEvent('settled'));\r\n }\r\n });\r\n\r\n const teardownSubscription = engineStreams.teardown$.subscribe(teardownFn => {\r\n element.__onTeardown.push(teardownFn);\r\n });\r\n\r\n element.__onTeardown.push(() => {\r\n [domSubscription, settledSubscription, teardownSubscription].forEach(s =>\r\n s.unsubscribe()\r\n );\r\n });\r\n}\r\n\r\nfunction tryAssigningNameProperties(ConstructF: () => DSCustomElement) {\r\n try {\r\n // Assign name to constructor if possible for semantics/helpfulness but swallow error if it doesn't allow (safari cough)\r\n Object.defineProperty(ConstructF, 'is', { value: name, writable: false });\r\n Object.defineProperty(ConstructF, 'localName', {\r\n value: name,\r\n writable: false,\r\n });\r\n } catch (error) {}\r\n}\r\n","import { Observable } from 'rxjs';\nimport { DSCustomElement, Driver } from '../core/core-types';\n\nexport type Effect = (element?: DSCustomElement) => void;\n\nexport function makeGenericEffectsDriver(customElement: DSCustomElement): Driver<Observable<Effect>, void> {\n return (effect$: Observable<Effect>): void => {\n effect$.subscribe({\n next(effect: Effect): void {\n effect(customElement);\n },\n error(): void {\n return;\n },\n complete(): void {\n return;\n }\n });\n };\n}\n"],"names":["root","factory","exports","module","define","amd","a","i","self","window","CustomEvent","event","params","bubbles","cancelable","detail","undefined","evt","document","createEvent","initCustomEvent","prototype","Event","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","hasOwnProperty","call","r","Symbol","toStringTag","value","toDashCase","str","charAt","slice","replace","toLowerCase","elementGuid","createGuid","require","enableProps","props","fnHashByName","reduce","indexed","set","Map","hooks","init","element","__innerProps$","BehaviorSubject","connectedCallback","obj1","obj2","equal","obj1Keys","obj2Keys","initialProps","getValue","updatedProps","constructor","observedAttributes","forEach","attrName","getAttribute","setPropFromAttr","Maybe","keys","length","next","classSetup","ConstructF","assign","filter","x","reflectAs","map","name","this","val","dashedName","observed","includes","setAttribute","String","removeAttribute","__attached","customElement","attrValue","mFnHashByName","propInitializer","camelName","$0","$1","toUpperCase","propConfig","propValue","Boolean","withDefault","setupShadowDOM","fragment","css","canTemplate","HTMLTemplateElement","generateCustomElementTemplate","generateCustomElementFragment","shadowRoot","querySelector","attachShadow","mode","shadowContent","importNode","sheet","cssText","appendChild","createDocumentFragment","styleTag","createElement","createTextNode","rootDiv","className","template","innerHTML","content","generateCustomElementWrapper","engine","options","useShadowDOM","getShadowBaseElementM","propsSetup","Array","isArray","Reflect","construct","HTMLElement","prototypeExtensions","__onTeardown","__onAttached","__guid","fn","engineStreams","props$","withDefaultFn","handleEngineStreams","__shadowAppBooted","tryAssigningNameProperties","create","component","writable","dataset","guid","alt","disconnectedCallback","reverse","attributeChangedCallback","oldVal","newVal","createSetupElement","elementConstructor","elementOptions","elementName","defineElement","customElements","interval","pipe","take","toPromise","then","placeholder","domSubscription","DOM$","subscribe","newElement","replaceChild","firstChild","settledSubscription","settled$","settled","dispatchEvent","teardownSubscription","teardown$","teardownFn","push","s","unsubscribe","error","makeGenericEffectsDriver","effect$","effect","complete"],"sourceRoot":""}
|