Comparing version 0.8.11 to 0.8.12
{ | ||
"name": "aurumjs", | ||
"version": "0.8.11", | ||
"version": "0.8.12", | ||
"main": "prebuilt/cjs/aurumjs.js", | ||
@@ -14,2 +14,3 @@ "typings": "prebuilt/cjs/aurumjs.d.ts", | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
@@ -16,0 +17,0 @@ "@types/chai": "^4.2.5", |
@@ -220,3 +220,3 @@ "use strict"; | ||
case RemoteProtocol.PERFORM_RPC_ERR: | ||
pendingRPCResponses.get(msg.uuid).reject(msg.error); | ||
pendingRPCResponses.get(msg.uuid).reject(new Error(msg.error)); | ||
pendingRPCResponses.delete(msg.uuid); | ||
@@ -223,0 +223,0 @@ break; |
@@ -67,3 +67,5 @@ "use strict"; | ||
} | ||
selected = routes.find((r) => r.factory === DefaultRoute); | ||
if (!selected) { | ||
selected = routes.find((r) => r.factory === DefaultRoute); | ||
} | ||
} | ||
@@ -70,0 +72,0 @@ } |
@@ -1,2 +0,8 @@ | ||
export declare function aurumToString(content: any): Promise<string>; | ||
export interface AurumStringAdapterConfig { | ||
attributeBlacklist?: string[]; | ||
attributeWhitelist?: string[]; | ||
tagBlacklist?: string[]; | ||
tagWhitelist?: string[]; | ||
} | ||
export declare function aurumToString(content: any, config?: AurumStringAdapterConfig): Promise<string>; | ||
//# sourceMappingURL=string_adapter.d.ts.map |
@@ -8,3 +8,3 @@ "use strict"; | ||
const cancellation_token_js_1 = require("../utilities/cancellation_token.js"); | ||
async function aurumToString(content) { | ||
async function aurumToString(content, config = {}) { | ||
if (content === undefined || content === null) { | ||
@@ -44,2 +44,8 @@ return ''; | ||
} | ||
if (config.tagBlacklist && config.tagBlacklist.includes(item.name)) { | ||
return ''; | ||
} | ||
if (config.tagWhitelist && !config.tagWhitelist.includes(item.name)) { | ||
return ''; | ||
} | ||
let propString = ' '; | ||
@@ -51,3 +57,11 @@ let children = ''; | ||
for (const prop in item.props) { | ||
propString += `${prop}="${item.props[prop].toString()}" `; | ||
if (config.attributeBlacklist && config.attributeBlacklist.includes(prop)) { | ||
continue; | ||
} | ||
if (config.attributeWhitelist && !config.attributeWhitelist.includes(prop)) { | ||
continue; | ||
} | ||
if (item.props[prop] != undefined) { | ||
propString += `${prop}="${item.props[prop].toString()}" `; | ||
} | ||
} | ||
@@ -54,0 +68,0 @@ return `<${item.name}${propString.trimRight()}>${children}</${item.name}>`; |
@@ -596,3 +596,3 @@ "use strict"; | ||
return { | ||
name: `pick ${key}`, | ||
name: `pick ${key.toString()}`, | ||
operationType: operator_model_js_1.OperationType.MAP, | ||
@@ -599,0 +599,0 @@ operation: (v) => { |
@@ -523,2 +523,3 @@ import { AurumServerInfo } from '../aurum_server/aurum_server_client.js'; | ||
static fromMultipleMaps<K, V>(maps: MapDataSource<K, V>[], cancellationToken?: CancellationToken): MapDataSource<K, V>; | ||
pipe(target: MapDataSource<K, V>, cancellation?: CancellationToken): void; | ||
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void; | ||
@@ -635,2 +636,6 @@ toString(): string; | ||
static fromRemoteSource<T>(aurumServerInfo: AurumServerInfo, cancellation: CancellationToken): SetDataSource<T>; | ||
/** | ||
* Remove all listeners | ||
*/ | ||
cancelAll(): void; | ||
applySetChange(change: SetChange<K>): void; | ||
@@ -637,0 +642,0 @@ clear(): void; |
@@ -44,2 +44,6 @@ import { AurumServerInfo } from '../aurum_server/aurum_server_client.js'; | ||
toString(): string; | ||
/** | ||
* Remove all listeners | ||
*/ | ||
cancelAll(): void; | ||
pickObject<K extends keyof T>(key: K, cancellationToken?: CancellationToken): ObjectDataSource<T[K]>; | ||
@@ -46,0 +50,0 @@ pickArray<K extends keyof T>(key: K, cancellationToken?: CancellationToken): ArrayDataSource<FlatArray<T[K], 1>>; |
@@ -36,2 +36,9 @@ "use strict"; | ||
} | ||
/** | ||
* Remove all listeners | ||
*/ | ||
cancelAll() { | ||
this.updateEvent.cancelAll(); | ||
this.updateEventOnKey.forEach((v) => v.cancelAll()); | ||
} | ||
pickObject(key, cancellationToken) { | ||
@@ -38,0 +45,0 @@ if (typeof this.data[key] === 'object') { |
@@ -210,3 +210,3 @@ import { CancellationToken } from '../utilities/cancellation_token.js'; | ||
case RemoteProtocol.PERFORM_RPC_ERR: | ||
pendingRPCResponses.get(msg.uuid).reject(msg.error); | ||
pendingRPCResponses.get(msg.uuid).reject(new Error(msg.error)); | ||
pendingRPCResponses.delete(msg.uuid); | ||
@@ -213,0 +213,0 @@ break; |
@@ -63,3 +63,5 @@ import { resolveChildren, urlHashEmitter } from '../aurumjs.js'; | ||
} | ||
selected = routes.find((r) => r.factory === DefaultRoute); | ||
if (!selected) { | ||
selected = routes.find((r) => r.factory === DefaultRoute); | ||
} | ||
} | ||
@@ -66,0 +68,0 @@ } |
@@ -1,2 +0,8 @@ | ||
export declare function aurumToString(content: any): Promise<string>; | ||
export interface AurumStringAdapterConfig { | ||
attributeBlacklist?: string[]; | ||
attributeWhitelist?: string[]; | ||
tagBlacklist?: string[]; | ||
tagWhitelist?: string[]; | ||
} | ||
export declare function aurumToString(content: any, config?: AurumStringAdapterConfig): Promise<string>; | ||
//# sourceMappingURL=string_adapter.d.ts.map |
@@ -5,3 +5,3 @@ import { createAPI } from '../rendering/aurum_element.js'; | ||
import { CancellationToken } from '../utilities/cancellation_token.js'; | ||
export async function aurumToString(content) { | ||
export async function aurumToString(content, config = {}) { | ||
if (content === undefined || content === null) { | ||
@@ -41,2 +41,8 @@ return ''; | ||
} | ||
if (config.tagBlacklist && config.tagBlacklist.includes(item.name)) { | ||
return ''; | ||
} | ||
if (config.tagWhitelist && !config.tagWhitelist.includes(item.name)) { | ||
return ''; | ||
} | ||
let propString = ' '; | ||
@@ -48,3 +54,11 @@ let children = ''; | ||
for (const prop in item.props) { | ||
propString += `${prop}="${item.props[prop].toString()}" `; | ||
if (config.attributeBlacklist && config.attributeBlacklist.includes(prop)) { | ||
continue; | ||
} | ||
if (config.attributeWhitelist && !config.attributeWhitelist.includes(prop)) { | ||
continue; | ||
} | ||
if (item.props[prop] != undefined) { | ||
propString += `${prop}="${item.props[prop].toString()}" `; | ||
} | ||
} | ||
@@ -51,0 +65,0 @@ return `<${item.name}${propString.trimRight()}>${children}</${item.name}>`; |
@@ -564,3 +564,3 @@ import { EventEmitter } from '../utilities/event_emitter.js'; | ||
return { | ||
name: `pick ${key}`, | ||
name: `pick ${key.toString()}`, | ||
operationType: OperationType.MAP, | ||
@@ -567,0 +567,0 @@ operation: (v) => { |
@@ -523,2 +523,3 @@ import { AurumServerInfo } from '../aurum_server/aurum_server_client.js'; | ||
static fromMultipleMaps<K, V>(maps: MapDataSource<K, V>[], cancellationToken?: CancellationToken): MapDataSource<K, V>; | ||
pipe(target: MapDataSource<K, V>, cancellation?: CancellationToken): void; | ||
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void; | ||
@@ -635,2 +636,6 @@ toString(): string; | ||
static fromRemoteSource<T>(aurumServerInfo: AurumServerInfo, cancellation: CancellationToken): SetDataSource<T>; | ||
/** | ||
* Remove all listeners | ||
*/ | ||
cancelAll(): void; | ||
applySetChange(change: SetChange<K>): void; | ||
@@ -637,0 +642,0 @@ clear(): void; |
@@ -44,2 +44,6 @@ import { AurumServerInfo } from '../aurum_server/aurum_server_client.js'; | ||
toString(): string; | ||
/** | ||
* Remove all listeners | ||
*/ | ||
cancelAll(): void; | ||
pickObject<K extends keyof T>(key: K, cancellationToken?: CancellationToken): ObjectDataSource<T[K]>; | ||
@@ -46,0 +50,0 @@ pickArray<K extends keyof T>(key: K, cancellationToken?: CancellationToken): ArrayDataSource<FlatArray<T[K], 1>>; |
@@ -33,2 +33,9 @@ import { syncObjectDataSource } from '../aurum_server/aurum_server_client.js'; | ||
} | ||
/** | ||
* Remove all listeners | ||
*/ | ||
cancelAll() { | ||
this.updateEvent.cancelAll(); | ||
this.updateEventOnKey.forEach((v) => v.cancelAll()); | ||
} | ||
pickObject(key, cancellationToken) { | ||
@@ -35,0 +42,0 @@ if (typeof this.data[key] === 'object') { |
{ | ||
"name": "aurumjs", | ||
"version": "0.8.11", | ||
"version": "0.8.12", | ||
"main": "prebuilt/cjs/aurumjs.js", | ||
@@ -5,0 +5,0 @@ "typings": "prebuilt/cjs/aurumjs.d.ts", |
@@ -12,2 +12,3 @@ { | ||
"experimentalDecorators": true, | ||
"incremental": true, | ||
"jsx": "react", | ||
@@ -14,0 +15,0 @@ "jsxFactory": "Aurum.factory", |
@@ -12,2 +12,3 @@ { | ||
"experimentalDecorators": true, | ||
"incremental": true, | ||
"jsx": "react", | ||
@@ -14,0 +15,0 @@ "jsxFactory": "Aurum.factory", |
@@ -12,2 +12,3 @@ { | ||
"experimentalDecorators": true, | ||
"incremental": true, | ||
"jsx": "react", | ||
@@ -14,0 +15,0 @@ "jsxFactory": "Aurum.factory", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3394023
293
45107