web-component-wrapper 0.0.601 → 0.0.604

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.
@@ -1 +1,16 @@
1
- "use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var l in i)("object"==typeof exports?exports:e)[l]=i[l]}}(this,(function(){return{r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}.r(e={}),e;var e}));
1
+ if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;// -*- coding: utf-8 -*-
2
+ /** @module type *//* !
3
+ region header
4
+ [Project page](https://torben.website/storelocator)
5
+
6
+ Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
7
+
8
+ License
9
+ -------
10
+
11
+ This library written by Torben Sickert stands under a creative commons
12
+ naming 3.0 unported license.
13
+ See https://creativecommons.org/licenses/by/3.0/deed.de
14
+ endregion
15
+ */// region imports
16
+
@@ -1,4 +1,4 @@
1
- import { PropertyConfiguration } from './type';
1
+ import type { PropertyConfiguration } from './type';
2
2
  /**
3
3
  * Generates a decorator based on given configuration.
4
4
  * @param options - Property configuration to define how to transfer attributes
package/dist/decorator.js CHANGED
@@ -1 +1,132 @@
1
- "use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("clientnode/property-types"));else if("function"==typeof define&&define.amd)define(["clientnode","clientnode/property-types"],t);else{var r="object"==typeof exports?t(require("clientnode"),require("clientnode/property-types")):t(e.clientnode,e["clientnode/property-types"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,((e,t)=>(()=>{var r=[t=>{t.exports=e},e=>{e.exports=t}],o={};function p(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,p),s.exports}p.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return p.d(t,{a:t}),t},p.d=(e,t)=>{for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},p.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),p.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};p.r(s),p.d(s,{default:()=>a,property:()=>n});var i=p(0),l=p(1);function n(e={}){return e={readAttribute:!0,type:l.string,...e},function(t,r){if("string"!=typeof r)return;const o=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(o,"observedAttributes")||(o.observedAttributes=o.observedAttributes?[...o.observedAttributes]:[]);const e=(0,i.camelCaseToDelimited)(r);o.observedAttributes&&!o.observedAttributes.includes(e)&&o.observedAttributes.push(e)}if(e.type&&(Object.prototype.hasOwnProperty.call(o,"propertyTypes")||(o.propertyTypes=o.propertyTypes?{...o.propertyTypes}:{}),!o.propertyTypes||!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(o,"propertiesToReflectAsAttributes")||(o.propertiesToReflectAsAttributes=o.propertiesToReflectAsAttributes?(0,i.copy)(o.propertiesToReflectAsAttributes):[]),e.update||o.propertiesToReflectAsAttributes instanceof Map&&!o.propertiesToReflectAsAttributes.has(r)||Array.isArray(o.propertiesToReflectAsAttributes)&&!o.propertiesToReflectAsAttributes.includes(r)||"object"==typeof o.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(o.propertiesToReflectAsAttributes,r))){let t;"boolean"==typeof e.writeAttribute?e.writeAttribute&&o.propertyTypes&&Object.prototype.hasOwnProperty.call(o.propertyTypes,r)&&(t=o.propertyTypes[r]):t=e.writeAttribute,void 0!==t&&(Array.isArray(o.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?o.propertiesToReflectAsAttributes.push(r):o.normalizePropertyTypeList&&(o.propertiesToReflectAsAttributes=o.normalizePropertyTypeList(o.propertiesToReflectAsAttributes))),o.propertiesToReflectAsAttributes instanceof Map&&o.propertiesToReflectAsAttributes.set(r,t),"object"==typeof o.propertiesToReflectAsAttributes&&(o.propertiesToReflectAsAttributes[r]=t))}e.alias&&(Object.prototype.hasOwnProperty.call(o,"propertyAliases")||(o.propertyAliases=o.propertyAliases?{...o.propertyAliases}:{}),!o.propertyAliases||!e.update&&Object.prototype.hasOwnProperty.call(o,r)||(o.propertyAliases[r]=e.alias))}}const a=n;return s})()));
1
+ if(typeof window==='undefined'||window===null)var window=(typeof global==='undefined'||global===null)?{}:global;import * as __WEBPACK_EXTERNAL_MODULE_clientnode__ from "clientnode";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_clientnode_property_types_4789ebe2__ from "clientnode/property-types";
3
+ /******/ var __webpack_modules__ = ([
4
+ /* 0 */
5
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6
+
7
+ const x = (y) => {
8
+ const x = {}; __webpack_require__.d(x, y); return x
9
+ }
10
+ const y = (x) => (() => (x))
11
+ module.exports = x({ ["camelCaseToDelimited"]: () => (__WEBPACK_EXTERNAL_MODULE_clientnode__.camelCaseToDelimited), ["copy"]: () => (__WEBPACK_EXTERNAL_MODULE_clientnode__.copy) });
12
+
13
+ /***/ }),
14
+ /* 1 */
15
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
+
17
+ const x = (y) => {
18
+ const x = {}; __webpack_require__.d(x, y); return x
19
+ }
20
+ const y = (x) => (() => (x))
21
+ module.exports = x({ ["string"]: () => (__WEBPACK_EXTERNAL_MODULE_clientnode_property_types_4789ebe2__.string) });
22
+
23
+ /***/ })
24
+ /******/ ]);
25
+ /************************************************************************/
26
+ /******/ // The module cache
27
+ /******/ const __webpack_module_cache__ = {};
28
+ /******/
29
+ /******/ // The require function
30
+ /******/ function __webpack_require__(moduleId) {
31
+ /******/ // Check if module is in cache
32
+ /******/ const cachedModule = __webpack_module_cache__[moduleId];
33
+ /******/ if (cachedModule !== undefined) {
34
+ /******/ return cachedModule.exports;
35
+ /******/ }
36
+ /******/ // Create a new module (and put it into the cache)
37
+ /******/ const module = __webpack_module_cache__[moduleId] = {
38
+ /******/ // no module.id needed
39
+ /******/ // no module.loaded needed
40
+ /******/ exports: {}
41
+ /******/ };
42
+ /******/
43
+ /******/ // Execute the module function
44
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
45
+ /******/
46
+ /******/ // Return the exports of the module
47
+ /******/ return module.exports;
48
+ /******/ }
49
+ /******/
50
+ /************************************************************************/
51
+ /******/ /* webpack/runtime/define property getters */
52
+ /******/ (() => {
53
+ /******/ // define getter/value functions for harmony exports
54
+ /******/ __webpack_require__.d = (exports, definition) => {
55
+ /******/ if(Array.isArray(definition)) {
56
+ /******/ var i = 0;
57
+ /******/ while(i < definition.length) {
58
+ /******/ var key = definition[i++];
59
+ /******/ var binding = definition[i++];
60
+ /******/ if(!__webpack_require__.o(exports, key)) {
61
+ /******/ if(binding === 0) {
62
+ /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
63
+ /******/ } else {
64
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
65
+ /******/ }
66
+ /******/ } else if(binding === 0) { i++; }
67
+ /******/ }
68
+ /******/ } else {
69
+ /******/ for(var key in definition) {
70
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
71
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
72
+ /******/ }
73
+ /******/ }
74
+ /******/ }
75
+ /******/ };
76
+ /******/ })();
77
+ /******/
78
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
79
+ /******/ (() => {
80
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
81
+ /******/ })();
82
+ /******/
83
+ /************************************************************************/
84
+ let __webpack_exports__ = {};
85
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
86
+ /* harmony export */ A: () => (decorator),
87
+ /* harmony export */ M: () => (/* binding */ property)
88
+ /* harmony export */ });
89
+ /* harmony import */ var clientnode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
90
+ /* harmony import */ var clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
91
+ // #!/usr/bin/env babel-node
92
+ // -*- coding: utf-8 -*-
93
+ /** @module decorator *//* !
94
+ region header
95
+ [Project page](https://torben.website/web-component-wrapper)
96
+
97
+ Copyright Torben Sickert (info["~at~"]torben.website) 16.12.2012
98
+
99
+ License
100
+ -------
101
+
102
+ This library written by Torben Sickert stands under a creative commons
103
+ naming 3.0 unported license.
104
+ See https://creativecommons.org/licenses/by/3.0/deed.de
105
+ endregion
106
+ */// region imports
107
+ // endregion
108
+ /**
109
+ * Generates a decorator based on given configuration.
110
+ * @param options - Property configuration to define how to transfer attributes
111
+ * and properties into each other.
112
+ * @param options.alias - Alternate property name.
113
+ * @param options.readAttribute - Indicates whether to read from existing
114
+ * attribute also.
115
+ * @param options.type - Value type to parse value.
116
+ * @param options.update - Indicates whether to overwrite already existing
117
+ * property configurations.
118
+ * @param options.writeAttribute - Indicates whether to sync attribute
119
+ * representation back into dom.
120
+ * @returns Generated decorator.
121
+ */function property(options={}){options={readAttribute:true,type:clientnode_property_types__WEBPACK_IMPORTED_MODULE_1__.string,...options};/**
122
+ * Registers given property to different property / attribute conversion
123
+ * data structures.
124
+ * NOTE: It is important to set static configuration properties on its
125
+ * "own" properties instead of some inherited one. So we have to check via
126
+ * "hasOwnProperty" for existence in this decorator.
127
+ * @param target - Instance to apply given property to.
128
+ * @param name - Field name to apply.
129
+ */return function(target,name){if(typeof name!=="string")return;const self=target.self||target.constructor;if(options.readAttribute){if(!Object.prototype.hasOwnProperty.call(self,"observedAttributes"))self.observedAttributes=self.observedAttributes?[...self.observedAttributes]:[];const attributeName=(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.camelCaseToDelimited)(name);if(self.observedAttributes&&!self.observedAttributes.includes(attributeName))self.observedAttributes.push(attributeName)}if(options.type){if(!Object.prototype.hasOwnProperty.call(self,"propertyTypes"))self.propertyTypes=self.propertyTypes?{...self.propertyTypes}:{};if(self.propertyTypes&&(options.update||!Object.prototype.hasOwnProperty.call(self,name)))self.propertyTypes[name]=options.type}if(options.writeAttribute){if(!Object.prototype.hasOwnProperty.call(self,"propertiesToReflectAsAttributes"))self.propertiesToReflectAsAttributes=self.propertiesToReflectAsAttributes?(0,clientnode__WEBPACK_IMPORTED_MODULE_0__.copy)(self.propertiesToReflectAsAttributes):[];if(options.update||self.propertiesToReflectAsAttributes instanceof Map&&!self.propertiesToReflectAsAttributes.has(name)||Array.isArray(self.propertiesToReflectAsAttributes)&&!self.propertiesToReflectAsAttributes.includes(name)||typeof self.propertiesToReflectAsAttributes==="object"&&!Object.prototype.hasOwnProperty.call(self.propertiesToReflectAsAttributes,name)){let result;if(typeof options.writeAttribute==="boolean"){if(options.writeAttribute&&self.propertyTypes&&Object.prototype.hasOwnProperty.call(self.propertyTypes,name))result=self.propertyTypes[name]}else result=options.writeAttribute;if(result!==undefined){if(Array.isArray(self.propertiesToReflectAsAttributes))if(options.writeAttribute===true)self.propertiesToReflectAsAttributes.push(name);else if(self.normalizePropertyTypeList)self.propertiesToReflectAsAttributes=self.normalizePropertyTypeList(self.propertiesToReflectAsAttributes);if(self.propertiesToReflectAsAttributes instanceof Map)self.propertiesToReflectAsAttributes.set(name,result);if(typeof self.propertiesToReflectAsAttributes==="object")self.propertiesToReflectAsAttributes[name]=result}}}if(options.alias){if(!Object.prototype.hasOwnProperty.call(self,"propertyAliases"))self.propertyAliases=self.propertyAliases?{...self.propertyAliases}:{};if(self.propertyAliases&&(options.update||!Object.prototype.hasOwnProperty.call(self,name)))self.propertyAliases[name]=options.alias}}}/* harmony default export */ const decorator = (property);
130
+ const __webpack_exports__default = __webpack_exports__.A;
131
+ const __webpack_exports__property = __webpack_exports__.M;
132
+ export { __webpack_exports__default as default, __webpack_exports__property as property };