From f6c561fe28639d207ab0dac2bf73362b579b8910 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Date: Tue, 22 Jan 2019 17:11:36 +0100 Subject: [PATCH] update: use unpkg.com --- src/dependencies.pug | 5 ++--- src/scripts/hd-widgets.js | 13 +++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dependencies.pug b/src/dependencies.pug index ac29a91..e9cacd3 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -33,9 +33,8 @@ link(rel='stylesheet', href='https://fonts.googleapis.com/css?family=Open+Sans:3 //link(rel='import', href='/lib/sib-chat/sib-chat.html') //- cdn -script(type="module" src="https://cdn.happy-dev.fr/sib-core/sib-display.js") -script(type="module" src="https://cdn.happy-dev.fr/sib-router/sib-router.js") -script(type="module" src="https://cdn.happy-dev.fr/sib-core/sib-form.js") +script(type="module" src="https://unpkg.com/@startinblox/core@latest") +script(type="module" src="https://unpkg.com/@startinblox/router@latest") script(type="module" src="https://cdn.happy-dev.fr/sib-chat/sib-chat.js") script(type="module" src="/scripts/hd-widgets.js") diff --git a/src/scripts/hd-widgets.js b/src/scripts/hd-widgets.js index bb401d4..228e2a9 100644 --- a/src/scripts/hd-widgets.js +++ b/src/scripts/hd-widgets.js @@ -1,12 +1,13 @@ -import {SIBDisplayLookupList} from 'https://cdn.happy-dev.fr/sib-core/widgets/sib-display-widgets.js'; -import {SIBWidget} from 'https://cdn.happy-dev.fr/sib-core/widgets/sib-base-widgets.js'; -import {store} from 'https://cdn.happy-dev.fr/sib-core/store.js'; -import {uniqID} from 'https://cdn.happy-dev.fr/sib-core/helpers.js'; +import {DisplayWidgets, Helpers, SIBWidget} from 'https://unpkg.com/@startinblox/core@latest'; +import {store} from 'https://unpkg.com/@startinblox/core@latest/src/store'; + +const SIBDisplayLookupList = DisplayWidgets.SIBDisplayLookupList; class HDAppUserInfo extends SIBDisplayLookupList { get parentElement() { return 'div'; } + getTemplate(value, index) { var firstname, lastname, email; @@ -57,6 +58,7 @@ class HDAppAuthor extends SIBDisplayLookupList { get parentElement() { return 'div'; } + getTemplate(value, index) { var firstname, lastname; if (typeof value == 'object') @@ -119,8 +121,7 @@ class HDAppHyperlink extends SIBWidget { class HDAppLinkMore extends SIBWidget { get template() { - const id = uniqID(); - console.warn('HDAppLinkMore', this); + const id = Helpers.uniqID(); return ` ${this.label} ${this.name}