Skip to content

Commit

Permalink
add RxCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
vrubinat committed Nov 8, 2018
1 parent 26b1600 commit f6ed17c
Show file tree
Hide file tree
Showing 14 changed files with 2,919 additions and 2,672 deletions.
5,405 changes: 2,837 additions & 2,568 deletions docs/ast/source/src/map/RxMap.js.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/class/RxMap/src/map/RxMap.js~RxMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
</nav>

<div class="content" data-ice="content"><div class="header-notice">
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {RxMap} from &apos;<span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber14">@rxmap/rxmap/RxMap/src/map/RxMap.js</a></span>&apos;</code></pre></div>
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import {RxMap} from &apos;<span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber16">@rxmap/rxmap/RxMap/src/map/RxMap.js</a></span>&apos;</code></pre></div>
<span data-ice="access">public</span>
<span data-ice="kind">class</span>



<span data-ice="source">| <span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber14">source</a></span></span>
<span data-ice="source">| <span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber16">source</a></span></span>
</div>

<div class="self-detail detail">
Expand Down Expand Up @@ -596,7 +596,7 @@ <h3 data-ice="anchor" id="instance-constructor-constructor">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber15">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber17">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -642,7 +642,7 @@ <h3 data-ice="anchor" id="instance-member-libName">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber19">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber21">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -686,7 +686,7 @@ <h3 data-ice="anchor" id="instance-member-libVersion">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber23">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber25">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -730,7 +730,7 @@ <h3 data-ice="anchor" id="instance-member-store">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber27">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber29">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -777,7 +777,7 @@ <h3 data-ice="anchor" id="instance-method-getDataType">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber153">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber155">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -850,7 +850,7 @@ <h3 data-ice="anchor" id="instance-method-getMap">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber36">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber38">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -906,7 +906,7 @@ <h3 data-ice="anchor" id="instance-method-getMapLibrary">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber97">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber99">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -962,7 +962,7 @@ <h3 data-ice="anchor" id="instance-method-init">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber116">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber118">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1019,7 +1019,7 @@ <h3 data-ice="anchor" id="instance-method-load">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber78">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber80">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1100,7 +1100,7 @@ <h3 data-ice="anchor" id="instance-method-observerData">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber165">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber167">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1176,7 +1176,7 @@ <h3 data-ice="anchor" id="instance-method-setDataType">
<span class="right-info">


<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber142">source</a></span></span>
<span data-ice="source"><span><a href="file/RxMap/src/map/RxMap.js.html#lineNumber144">source</a></span></span>
</span>
</h3>

Expand Down
8 changes: 4 additions & 4 deletions docs/coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@
"expectCount": 16,
"actualCount": 12,
"undocumentLines": [
15,
83,
86,
170
17,
85,
88,
172
]
},
"RxMap/src/map/config.js": {
Expand Down
4 changes: 3 additions & 1 deletion docs/file/RxMap/src/map/RxMap.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@
<div class="content" data-ice="content"><h1 data-ice="title">RxMap/src/map/RxMap.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">
import { take } from &apos;rxjs/internal/operators/take&apos;;
import { createObjectObservable } from &apos;@xlab-tech/rxcollection&apos;;
import proxyAction from &apos;../core/proxyAction&apos;;
import importMapLibrary from &apos;./importMapLibrary&apos;;
import observableStore from &apos;../core/observableStore&apos;;


let _Map;

/**
Expand All @@ -101,7 +103,7 @@
/**
* {observableStore} Store observable
*/
this.store = observableStore();
this.store = createObjectObservable();
}

/**
Expand Down
34 changes: 17 additions & 17 deletions docs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,7 @@
"__docId__": 105,
"kind": "file",
"name": "RxMap/src/map/RxMap.js",
"content": "\nimport { take } from 'rxjs/internal/operators/take';\nimport proxyAction from '../core/proxyAction';\nimport importMapLibrary from './importMapLibrary';\nimport observableStore from '../core/observableStore';\n\nlet _Map;\n\n/**\n * Clase que permite interactiar con los mapas a partir de comandos y observadores\n *\n * @extends {CommandBus}\n */\nexport class RxMap {\n constructor() {\n /**\n * {String} nombre de la libreria de Mapas que se utiliza\n */\n this.libName = null;\n /**\n * {String} version de la libreria que se utiliza\n */\n this.libVersion = null;\n /**\n * {observableStore} Store observable\n */\n this.store = observableStore();\n }\n\n /**\n * Debuelve la instancia del mapa nativo que se esta utilizando\n *\n * @returns {object}\n * @memberof RxMap\n */\n getMap() {\n return this._sourceMap;\n }\n\n /**\n * Recupera el contexto para las ejecuciones de los comandos y observadores\n * @param { object} [value] puede recibir la ultima ejecucion si se solicita desde AsyncCommand\n * @returns {object}\n * @private\n */\n getContext() {\n return {\n library: this.getMapLibrary(),\n store: this.store,\n };\n }\n /**\n * @typedef {Object} action\n * @property {String} key nombre del comando.\n * @property {string} [lib] libreria del comando.\n * @property {string} [path] Ruta de la libreria.\n * @private\n */\n\n /**\n * @typedef {Object} loadOptions\n * @property {String} [version=latest] Version de la libreria, actualmente solo soporta latest\n * @property {String} [key] Clave de la libreria de mapas que se utiliza, para las librerias que necesiten key\n * @private\n *\n */\n\n /**\n * Metodo asyncrono que permite cargar la libreria de mapas que se le pasa por\n * parametros\n *\n * @param {String} lib Nombre de la libreria de mapas\n * @param {loadOptions} [options={}]\n *\n * @returns {Promise}\n * @memberof RxMap\n */\n async load(lib, options = {}) {\n this.libName = lib;\n this.libVersion = options.version || 'latest';\n\n this._actionsSubject.pipe(take(1)).subscribe((res) => {\n this._sourceMap = res.value;\n });\n // First Load Map Lib\n this._nativeLibrary = await importMapLibrary(lib, options);\n\n return this;\n }\n\n /**\n * Devuelve la libreria nativa que se esta utilizando\n *\n * @returns {Object}\n * @memberof RxMap\n */\n getMapLibrary() {\n if (this._nativeLibrary) {\n return this._nativeLibrary;\n }\n if (window.L) {\n return window.L;\n }\n if (window.google && window.google.maps) {\n return window.google;\n }\n return null;\n }\n\n /**\n * Crear un nuevo objeto RxMap\n *\n * @returns RxMap\n * @memberof RxMap\n */\n init() {\n return proxyAction(new RxMap());\n }\n\n /**\n * @typedef {Object} Style\n * @property {String} [icon] url del icono.\n * @property {object} [size] tamaño del icono con {width:0,height:0}\n * @property {string} [color] Color del contorno\n * @property {string} [fillColor] Color del relleno\n * @property {number} [opacity] opacidad del contorno\n * @property {number} [fillOpacity] opacidad del contorno\n * @property {number} [weight] ancho de la linea\n * @property {number} [radius] Radio del elemento\n * @private\n*/\n\n /**\n * Funcion que añade un estilo para dibujar posteriormenrte los diferentes\n * objetos que se inserten\n *\n * @param {string} id Id unico del tipo de dato\n * @param {string} geomType tipos de geometría valores posibles (marker / point)\n * @param {Style} style estilo del tipo de dato a pintar.\n * @memberof RxMap\n */\n setDataType(id, geomType, style) {\n this.store[`type@${id}`] = { geomType, style };\n }\n\n /**\n * Recupera un tipo de dato\n *\n * @param {String} id Nombre del tipo de dato a recuperar\n * @returns {Object{geomType:string,style:Style}}\n * @memberof RxMap\n */\n getDataType(id) {\n return this.store[`type@${id}`];\n }\n\n /**\n * Funcion que permite observar los datos del store,\n * Se puede pasar una propiedad o una expresion regular para poder\n * observar mas de un comando o todos.\n *\n * @param {String} name Nombre o Regex a evaluar\n * @return Observer\n*/\n observerData(property) {\n return this.store.observer(property);\n }\n}\n\nconst createMap = () => {\n if (!_Map) {\n _Map = proxyAction(new RxMap());\n }\n return _Map;\n};\n\n/**\n * Instancia de RxMap\n */\nexport default createMap();\n",
"content": "\nimport { take } from 'rxjs/internal/operators/take';\nimport { createObjectObservable } from '@xlab-tech/rxcollection';\nimport proxyAction from '../core/proxyAction';\nimport importMapLibrary from './importMapLibrary';\nimport observableStore from '../core/observableStore';\n\n\nlet _Map;\n\n/**\n * Clase que permite interactiar con los mapas a partir de comandos y observadores\n *\n * @extends {CommandBus}\n */\nexport class RxMap {\n constructor() {\n /**\n * {String} nombre de la libreria de Mapas que se utiliza\n */\n this.libName = null;\n /**\n * {String} version de la libreria que se utiliza\n */\n this.libVersion = null;\n /**\n * {observableStore} Store observable\n */\n this.store = createObjectObservable();\n }\n\n /**\n * Debuelve la instancia del mapa nativo que se esta utilizando\n *\n * @returns {object}\n * @memberof RxMap\n */\n getMap() {\n return this._sourceMap;\n }\n\n /**\n * Recupera el contexto para las ejecuciones de los comandos y observadores\n * @param { object} [value] puede recibir la ultima ejecucion si se solicita desde AsyncCommand\n * @returns {object}\n * @private\n */\n getContext() {\n return {\n library: this.getMapLibrary(),\n store: this.store,\n };\n }\n /**\n * @typedef {Object} action\n * @property {String} key nombre del comando.\n * @property {string} [lib] libreria del comando.\n * @property {string} [path] Ruta de la libreria.\n * @private\n */\n\n /**\n * @typedef {Object} loadOptions\n * @property {String} [version=latest] Version de la libreria, actualmente solo soporta latest\n * @property {String} [key] Clave de la libreria de mapas que se utiliza, para las librerias que necesiten key\n * @private\n *\n */\n\n /**\n * Metodo asyncrono que permite cargar la libreria de mapas que se le pasa por\n * parametros\n *\n * @param {String} lib Nombre de la libreria de mapas\n * @param {loadOptions} [options={}]\n *\n * @returns {Promise}\n * @memberof RxMap\n */\n async load(lib, options = {}) {\n this.libName = lib;\n this.libVersion = options.version || 'latest';\n\n this._actionsSubject.pipe(take(1)).subscribe((res) => {\n this._sourceMap = res.value;\n });\n // First Load Map Lib\n this._nativeLibrary = await importMapLibrary(lib, options);\n\n return this;\n }\n\n /**\n * Devuelve la libreria nativa que se esta utilizando\n *\n * @returns {Object}\n * @memberof RxMap\n */\n getMapLibrary() {\n if (this._nativeLibrary) {\n return this._nativeLibrary;\n }\n if (window.L) {\n return window.L;\n }\n if (window.google && window.google.maps) {\n return window.google;\n }\n return null;\n }\n\n /**\n * Crear un nuevo objeto RxMap\n *\n * @returns RxMap\n * @memberof RxMap\n */\n init() {\n return proxyAction(new RxMap());\n }\n\n /**\n * @typedef {Object} Style\n * @property {String} [icon] url del icono.\n * @property {object} [size] tamaño del icono con {width:0,height:0}\n * @property {string} [color] Color del contorno\n * @property {string} [fillColor] Color del relleno\n * @property {number} [opacity] opacidad del contorno\n * @property {number} [fillOpacity] opacidad del contorno\n * @property {number} [weight] ancho de la linea\n * @property {number} [radius] Radio del elemento\n * @private\n*/\n\n /**\n * Funcion que añade un estilo para dibujar posteriormenrte los diferentes\n * objetos que se inserten\n *\n * @param {string} id Id unico del tipo de dato\n * @param {string} geomType tipos de geometría valores posibles (marker / point)\n * @param {Style} style estilo del tipo de dato a pintar.\n * @memberof RxMap\n */\n setDataType(id, geomType, style) {\n this.store[`type@${id}`] = { geomType, style };\n }\n\n /**\n * Recupera un tipo de dato\n *\n * @param {String} id Nombre del tipo de dato a recuperar\n * @returns {Object{geomType:string,style:Style}}\n * @memberof RxMap\n */\n getDataType(id) {\n return this.store[`type@${id}`];\n }\n\n /**\n * Funcion que permite observar los datos del store,\n * Se puede pasar una propiedad o una expresion regular para poder\n * observar mas de un comando o todos.\n *\n * @param {String} name Nombre o Regex a evaluar\n * @return Observer\n*/\n observerData(property) {\n return this.store.observer(property);\n }\n}\n\nconst createMap = () => {\n if (!_Map) {\n _Map = proxyAction(new RxMap());\n }\n return _Map;\n};\n\n/**\n * Instancia de RxMap\n */\nexport default createMap();\n",
"static": true,
"longname": "/Users/vrubinat/Documents/xlab.tech/RxMap/src/map/RxMap.js",
"access": "public",
Expand All @@ -2588,7 +2588,7 @@
"importPath": "@rxmap/rxmap/RxMap/src/map/RxMap.js",
"importStyle": "{RxMap}",
"description": "Clase que permite interactiar con los mapas a partir de comandos y observadores",
"lineNumber": 14,
"lineNumber": 16,
"interface": false,
"extends": [
"CommandBus"
Expand All @@ -2605,7 +2605,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#constructor",
"access": "public",
"description": null,
"lineNumber": 15,
"lineNumber": 17,
"undocument": true
},
{
Expand All @@ -2617,7 +2617,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#libName",
"access": "public",
"description": "{String} nombre de la libreria de Mapas que se utiliza",
"lineNumber": 19,
"lineNumber": 21,
"type": {
"types": [
"*"
Expand All @@ -2633,7 +2633,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#libVersion",
"access": "public",
"description": "{String} version de la libreria que se utiliza",
"lineNumber": 23,
"lineNumber": 25,
"type": {
"types": [
"*"
Expand All @@ -2649,7 +2649,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#store",
"access": "public",
"description": "{observableStore} Store observable",
"lineNumber": 27,
"lineNumber": 29,
"type": {
"types": [
"*"
Expand All @@ -2667,7 +2667,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#getMap",
"access": "public",
"description": "Debuelve la instancia del mapa nativo que se esta utilizando",
"lineNumber": 36,
"lineNumber": 38,
"unknown": [
{
"tagName": "@returns",
Expand Down Expand Up @@ -2695,7 +2695,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#getContext",
"access": "private",
"description": "Recupera el contexto para las ejecuciones de los comandos y observadores",
"lineNumber": 46,
"lineNumber": 48,
"unknown": [
{
"tagName": "@returns",
Expand Down Expand Up @@ -2827,7 +2827,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#load",
"access": "public",
"description": "Metodo asyncrono que permite cargar la libreria de mapas que se le pasa por\nparametros",
"lineNumber": 78,
"lineNumber": 80,
"unknown": [
{
"tagName": "@returns",
Expand Down Expand Up @@ -2876,7 +2876,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#_sourceMap",
"access": "private",
"description": null,
"lineNumber": 83,
"lineNumber": 85,
"undocument": true,
"ignore": true,
"type": {
Expand All @@ -2894,7 +2894,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#_nativeLibrary",
"access": "private",
"description": null,
"lineNumber": 86,
"lineNumber": 88,
"undocument": true,
"ignore": true,
"type": {
Expand All @@ -2914,7 +2914,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#getMapLibrary",
"access": "public",
"description": " Devuelve la libreria nativa que se esta utilizando",
"lineNumber": 97,
"lineNumber": 99,
"unknown": [
{
"tagName": "@returns",
Expand Down Expand Up @@ -2942,7 +2942,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#init",
"access": "public",
"description": " Crear un nuevo objeto RxMap",
"lineNumber": 116,
"lineNumber": 118,
"unknown": [
{
"tagName": "@returns",
Expand Down Expand Up @@ -3070,7 +3070,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#setDataType",
"access": "public",
"description": "Funcion que añade un estilo para dibujar posteriormenrte los diferentes\nobjetos que se inserten",
"lineNumber": 142,
"lineNumber": 144,
"params": [
{
"nullable": null,
Expand Down Expand Up @@ -3116,7 +3116,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#getDataType",
"access": "public",
"description": "Recupera un tipo de dato",
"lineNumber": 153,
"lineNumber": 155,
"unknown": [
{
"tagName": "@returns",
Expand Down Expand Up @@ -3155,7 +3155,7 @@
"longname": "RxMap/src/map/RxMap.js~RxMap#observerData",
"access": "public",
"description": "Funcion que permite observar los datos del store,\nSe puede pasar una propiedad o una expresion regular para poder\nobservar mas de un comando o todos.",
"lineNumber": 165,
"lineNumber": 167,
"params": [
{
"nullable": null,
Expand Down Expand Up @@ -3191,7 +3191,7 @@
"importPath": "@rxmap/rxmap/RxMap/src/map/RxMap.js",
"importStyle": null,
"description": null,
"lineNumber": 170,
"lineNumber": 172,
"undocument": true,
"params": [],
"return": {
Expand Down

0 comments on commit f6ed17c

Please sign in to comment.