@salla.sa/twilight-components 1.0.17 → 1.0.18
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/{esm/Helper-81ac9a8c.js → twilight-components/Helper-d07ebbc7.js} +1 -1
- package/dist/twilight-components/app-globals-0f993ce5.js +3 -0
- package/dist/twilight-components/css-shim-a64b8820.js +4 -0
- package/dist/twilight-components/dom-d08ba8aa.js +73 -0
- package/dist/twilight-components/index-8966d27f.js +3010 -0
- package/dist/twilight-components/index.esm.js +4 -1
- package/dist/{esm → twilight-components}/salla-branches.entry.js +1 -1
- package/dist/twilight-components/salla-button.entry.js +75 -0
- package/dist/{esm → twilight-components}/salla-localization.entry.js +18 -16
- package/dist/{esm/salla-login-32d25ffa.js → twilight-components/salla-login-7c25f64b.js} +2 -2
- package/dist/twilight-components/salla-login-b92c73dc.js +127 -0
- package/dist/twilight-components/salla-login.entry.js +3 -0
- package/dist/twilight-components/salla-modal.entry.js +113 -0
- package/dist/twilight-components/salla-offer.entry.js +46 -0
- package/dist/{esm → twilight-components}/salla-product-availability.entry.js +2 -2
- package/dist/{esm → twilight-components}/salla-rating.entry.js +2 -2
- package/dist/{esm/salla-search-f552c487.js → twilight-components/salla-search-69f2d9c1.js} +2 -2
- package/dist/twilight-components/salla-search.entry.js +3 -0
- package/dist/{collection/components/salla-verify/salla-verify.js → twilight-components/salla-verify.entry.js} +16 -140
- package/dist/twilight-components/shadow-css-bc14d9fd.js +389 -0
- package/dist/twilight-components/twilight-components.css +3 -1
- package/dist/twilight-components/twilight-components.esm.js +125 -1
- package/dist/types/components/salla-localization/salla-localization.d.ts +2 -0
- package/dist/types/components/salla-login/salla-login.d.ts +3 -2
- package/dist/types/components/salla-offer/salla-offer.d.ts +50 -2
- package/dist/types/components/salla-verify/salla-verify.d.ts +2 -0
- package/dist/types/components.d.ts +6 -1
- package/package.json +1 -1
- package/dist/cjs/Helper-8852feaa.js +0 -23
- package/dist/cjs/index-0b5b5867.js +0 -1656
- package/dist/cjs/index.cjs.js +0 -13
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/salla-branches.cjs.entry.js +0 -92
- package/dist/cjs/salla-button_4.cjs.entry.js +0 -299
- package/dist/cjs/salla-localization.cjs.entry.js +0 -80
- package/dist/cjs/salla-login-342876b9.js +0 -118
- package/dist/cjs/salla-offer.cjs.entry.js +0 -25
- package/dist/cjs/salla-product-availability.cjs.entry.js +0 -75
- package/dist/cjs/salla-rating.cjs.entry.js +0 -300
- package/dist/cjs/salla-search-28da4616.js +0 -81
- package/dist/cjs/salla-search.cjs.entry.js +0 -11
- package/dist/cjs/twilight-components.cjs.js +0 -19
- package/dist/collection/Helpers/Helper.js +0 -19
- package/dist/collection/collection-manifest.json +0 -21
- package/dist/collection/components/generate-summary.js +0 -35
- package/dist/collection/components/salla-branches/salla-branches.css +0 -12
- package/dist/collection/components/salla-branches/salla-branches.js +0 -233
- package/dist/collection/components/salla-button/salla-button.css +0 -3
- package/dist/collection/components/salla-button/salla-button.js +0 -246
- package/dist/collection/components/salla-localization/salla-localization.js +0 -206
- package/dist/collection/components/salla-login/salla-login.js +0 -348
- package/dist/collection/components/salla-modal/salla-modal.js +0 -459
- package/dist/collection/components/salla-offer/salla-offer.js +0 -40
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +0 -331
- package/dist/collection/components/salla-rating/salla-rating.css +0 -7
- package/dist/collection/components/salla-rating/salla-rating.js +0 -483
- package/dist/collection/components/salla-search/salla-search.js +0 -132
- package/dist/collection/index.js +0 -2
- package/dist/collection/interfaces/colors.js +0 -1
- package/dist/collection/interfaces/index.js +0 -2
- package/dist/collection/interfaces/ratio.js +0 -1
- package/dist/collection/plugins/tailwind-theme/generator.js +0 -62
- package/dist/collection/plugins/tailwind-theme/index.js +0 -26
- package/dist/esm/index-8b97d225.js +0 -1628
- package/dist/esm/index.js +0 -4
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/salla-button_4.entry.js +0 -292
- package/dist/esm/salla-offer.entry.js +0 -21
- package/dist/esm/salla-search.entry.js +0 -3
- package/dist/esm/twilight-components.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/twilight-components/p-33990e49.entry.js +0 -1
- package/dist/twilight-components/p-36683152.js +0 -1
- package/dist/twilight-components/p-3cfede65.entry.js +0 -1
- package/dist/twilight-components/p-648661c8.entry.js +0 -1
- package/dist/twilight-components/p-93c3ac79.js +0 -1
- package/dist/twilight-components/p-9bc28e0c.js +0 -1
- package/dist/twilight-components/p-a923a51e.entry.js +0 -1
- package/dist/twilight-components/p-bc278b0e.entry.js +0 -1
- package/dist/twilight-components/p-cb1c59a2.js +0 -1
- package/dist/twilight-components/p-fa04c4b6.entry.js +0 -1
- package/dist/twilight-components/p-fa2f0e64.entry.js +0 -1
|
@@ -1 +1,125 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-8966d27f.js';
|
|
2
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
Stencil Client Patch Browser v2.8.1 | MIT Licensed | https://stenciljs.com
|
|
6
|
+
*/
|
|
7
|
+
const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
|
|
8
|
+
const patchBrowser = () => {
|
|
9
|
+
// NOTE!! This fn cannot use async/await!
|
|
10
|
+
if (BUILD.isDev && !BUILD.isTesting) {
|
|
11
|
+
consoleDevInfo('Running in development mode.');
|
|
12
|
+
}
|
|
13
|
+
if (BUILD.cssVarShim) {
|
|
14
|
+
// shim css vars
|
|
15
|
+
plt.$cssShim$ = win.__cssshim;
|
|
16
|
+
}
|
|
17
|
+
if (BUILD.cloneNodeFix) {
|
|
18
|
+
// opted-in to polyfill cloneNode() for slot polyfilled components
|
|
19
|
+
patchCloneNodeFix(H.prototype);
|
|
20
|
+
}
|
|
21
|
+
if (BUILD.profile && !performance.mark) {
|
|
22
|
+
// not all browsers support performance.mark/measure (Safari 10)
|
|
23
|
+
performance.mark = performance.measure = () => {
|
|
24
|
+
/*noop*/
|
|
25
|
+
};
|
|
26
|
+
performance.getEntriesByName = () => [];
|
|
27
|
+
}
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
|
|
30
|
+
? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
|
|
31
|
+
s.getAttribute('data-stencil-namespace') === NAMESPACE)
|
|
32
|
+
: null;
|
|
33
|
+
const importMeta = import.meta.url;
|
|
34
|
+
const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
|
|
35
|
+
if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
|
|
36
|
+
// Safari < v11 support: This IF is true if it's Safari below v11.
|
|
37
|
+
// This fn cannot use async/await since Safari didn't support it until v11,
|
|
38
|
+
// however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
|
|
39
|
+
// so both the ESM file and nomodule file would get downloaded. Only Safari
|
|
40
|
+
// has 'onbeforeload' in the script, and "history.scrollRestoration" was added
|
|
41
|
+
// to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
|
|
42
|
+
// IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
|
|
43
|
+
return {
|
|
44
|
+
then() {
|
|
45
|
+
/* promise noop */
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
if (!BUILD.safari10 && importMeta !== '') {
|
|
50
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
51
|
+
}
|
|
52
|
+
else if (BUILD.dynamicImportShim || BUILD.safari10) {
|
|
53
|
+
opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
|
|
54
|
+
if (BUILD.dynamicImportShim) {
|
|
55
|
+
patchDynamicImport(opts.resourcesUrl, scriptElm);
|
|
56
|
+
}
|
|
57
|
+
if (BUILD.dynamicImportShim && !win.customElements) {
|
|
58
|
+
// module support, but no custom elements support (Old Edge)
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
return import(/* webpackChunkName: "polyfills-dom" */ './dom-d08ba8aa.js').then(() => opts);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return promiseResolve(opts);
|
|
64
|
+
};
|
|
65
|
+
const patchDynamicImport = (base, orgScriptElm) => {
|
|
66
|
+
const importFunctionName = getDynamicImportFunction(NAMESPACE);
|
|
67
|
+
try {
|
|
68
|
+
// test if this browser supports dynamic imports
|
|
69
|
+
// There is a caching issue in V8, that breaks using import() in Function
|
|
70
|
+
// By generating a random string, we can workaround it
|
|
71
|
+
// Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
|
|
72
|
+
win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
// this shim is specifically for browsers that do support "esm" imports
|
|
76
|
+
// however, they do NOT support "dynamic" imports
|
|
77
|
+
// basically this code is for old Edge, v18 and below
|
|
78
|
+
const moduleMap = new Map();
|
|
79
|
+
win[importFunctionName] = (src) => {
|
|
80
|
+
const url = new URL(src, base).href;
|
|
81
|
+
let mod = moduleMap.get(url);
|
|
82
|
+
if (!mod) {
|
|
83
|
+
const script = doc.createElement('script');
|
|
84
|
+
script.type = 'module';
|
|
85
|
+
script.crossOrigin = orgScriptElm.crossOrigin;
|
|
86
|
+
script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
|
|
87
|
+
type: 'application/javascript',
|
|
88
|
+
}));
|
|
89
|
+
mod = new Promise((resolve) => {
|
|
90
|
+
script.onload = () => {
|
|
91
|
+
resolve(win[importFunctionName].m);
|
|
92
|
+
script.remove();
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
moduleMap.set(url, mod);
|
|
96
|
+
doc.head.appendChild(script);
|
|
97
|
+
}
|
|
98
|
+
return mod;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
103
|
+
const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
|
|
104
|
+
HTMLElementPrototype.cloneNode = function (deep) {
|
|
105
|
+
if (this.nodeName === 'TEMPLATE') {
|
|
106
|
+
return nativeCloneNodeFn.call(this, deep);
|
|
107
|
+
}
|
|
108
|
+
const clonedNode = nativeCloneNodeFn.call(this, false);
|
|
109
|
+
const srcChildNodes = this.childNodes;
|
|
110
|
+
if (deep) {
|
|
111
|
+
for (let i = 0; i < srcChildNodes.length; i++) {
|
|
112
|
+
// Node.ATTRIBUTE_NODE === 2, and checking because IE11
|
|
113
|
+
if (srcChildNodes[i].nodeType !== 2) {
|
|
114
|
+
clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return clonedNode;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
patchBrowser().then(options => {
|
|
123
|
+
globalScripts();
|
|
124
|
+
return bootstrapLazy([["salla-button",[[4,"salla-button",{"btnStyle":[513,"btn-style"],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"load":[64],"stop":[64],"disable":[64],"enable":[64]}]]],["salla-modal",[[4,"salla-modal",{"error":[4],"success":[4],"primary":[4],"isClosable":[1028,"is-closable"],"width":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"subTitle":[1,"sub-title"],"icon":[1],"imageIcon":[1,"image-icon"],"title":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login",[[0,"salla-login",{"isLoginByMail":[4,"is-login-by-mail"],"loginTypeTitle":[1,"login-type-title"],"loginText":[1,"login-text"],"smsLabel":[1,"sms-label"],"mobileLabel":[1,"mobile-label"],"emailLabel":[1,"email-label"],"enterText":[1,"enter-text"],"bySMSText":[1,"by-s-m-s-text"],"byEmailText":[1,"by-email-text"],"backText":[1,"back-text"],"show":[64]},[[0,"verified","onVerified"],[0,"backClicked","onbackClicked"]]]]],["salla-branches",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization",[[4,"salla-localization",{"languagesTitle":[1,"languages-title"],"currenciesTitle":[1,"currencies-title"],"ok":[1],"show":[64],"hide":[64],"submit":[64]}]]],["salla-product-availability",[[4,"salla-product-availability",{"channels":[1],"buttonText":[1,"button-text"],"countryCode":[1,"country-code"],"subscribeText":[1,"subscribe-text"],"cancelText":[1,"cancel-text"],"subTitle":[1,"sub-title"],"mobileLabel":[1,"mobile-label"],"emailLabel":[1,"email-label"],"mobilePlaceholder":[1,"mobile-placeholder"],"emailPlaceholder":[1,"email-placeholder"],"productId":[2,"product-id"],"subscribedMessage":[1,"subscribed-message"],"isSubscribed":[1028,"is-subscribed"],"submit":[64]}]]],["salla-rating",[[0,"salla-rating",{"orderId":[2,"order-id"],"thanksMsg":[1,"thanks-msg"],"isStoreRating":[4,"is-store-rating"],"isProductsRating":[4,"is-products-rating"],"isShippingRating":[4,"is-shipping-rating"],"show":[64],"hide":[64]}]]],["salla-offer",[[0,"salla-offer",{"offer":[32],"show":[64]}]]],["salla-search",[[0,"salla-search",{"placeholder":[1],"noResultsText":[1,"no-results-text"],"results":[32]},[[0,"modalClosed","onModalClose"]]]]],["salla-verify",[[0,"salla-verify",{"withoutModal":[4,"without-modal"],"url":[1],"by":[1],"backText":[1,"back-text"],"autoReload":[4,"auto-reload"],"getCode":[64],"show":[64]}]]]], options);
|
|
125
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare class SallaLogin {
|
|
2
2
|
constructor();
|
|
3
|
+
private inputChanged;
|
|
3
4
|
private modal;
|
|
4
5
|
private tab1;
|
|
5
6
|
private tab2;
|
|
@@ -17,6 +18,7 @@ export declare class SallaLogin {
|
|
|
17
18
|
private regType;
|
|
18
19
|
private readonly title;
|
|
19
20
|
host: HTMLElement;
|
|
21
|
+
isLoginByMail: boolean;
|
|
20
22
|
loginTypeTitle: string;
|
|
21
23
|
loginText: string;
|
|
22
24
|
smsLabel: string;
|
|
@@ -30,7 +32,7 @@ export declare class SallaLogin {
|
|
|
30
32
|
* @param {CustomEvent|{details:{case:'new_customer'|'authenticated', redirect_url:string|null}}} event
|
|
31
33
|
*/
|
|
32
34
|
onVerified(event: any): any;
|
|
33
|
-
|
|
35
|
+
onbackClicked(): void;
|
|
34
36
|
show(): Promise<HTMLElement>;
|
|
35
37
|
private showTab;
|
|
36
38
|
private loginByEmail;
|
|
@@ -38,5 +40,4 @@ export declare class SallaLogin {
|
|
|
38
40
|
private typing;
|
|
39
41
|
private newUser;
|
|
40
42
|
render(): any;
|
|
41
|
-
componentDidRender(): void;
|
|
42
43
|
}
|
|
@@ -1,8 +1,56 @@
|
|
|
1
1
|
export declare class SallaOffer {
|
|
2
2
|
private modal;
|
|
3
|
+
offer: null | {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
message: string;
|
|
7
|
+
expiry_date: string | null;
|
|
8
|
+
offer_type: string;
|
|
9
|
+
status: string;
|
|
10
|
+
buy: {
|
|
11
|
+
type: string;
|
|
12
|
+
quantity: number;
|
|
13
|
+
products: any[];
|
|
14
|
+
};
|
|
15
|
+
get: {
|
|
16
|
+
categories: null | Array<any>;
|
|
17
|
+
products: null | Array<{
|
|
18
|
+
id: number;
|
|
19
|
+
type: string;
|
|
20
|
+
promotion: {
|
|
21
|
+
title: string;
|
|
22
|
+
sub_title: string;
|
|
23
|
+
};
|
|
24
|
+
status: string;
|
|
25
|
+
is_available: boolean;
|
|
26
|
+
sku: string;
|
|
27
|
+
name: string;
|
|
28
|
+
price: {
|
|
29
|
+
amount: number;
|
|
30
|
+
currency: string;
|
|
31
|
+
};
|
|
32
|
+
sale_price: {
|
|
33
|
+
amount: number;
|
|
34
|
+
currency: string;
|
|
35
|
+
};
|
|
36
|
+
currency: string;
|
|
37
|
+
url: string;
|
|
38
|
+
thumbnail: string;
|
|
39
|
+
has_special_price: boolean;
|
|
40
|
+
regular_price: {
|
|
41
|
+
amount: number;
|
|
42
|
+
currency: string;
|
|
43
|
+
};
|
|
44
|
+
favorite?: any;
|
|
45
|
+
}>;
|
|
46
|
+
type: string;
|
|
47
|
+
discount_type: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
3
50
|
host: HTMLElement;
|
|
4
51
|
constructor();
|
|
5
|
-
show(
|
|
52
|
+
show(productId: number): Promise<void>;
|
|
53
|
+
private rememberMe;
|
|
6
54
|
render(): any;
|
|
7
|
-
|
|
55
|
+
componentDidRender(): void;
|
|
8
56
|
}
|
|
@@ -15,8 +15,10 @@ export declare class SallaVerify {
|
|
|
15
15
|
withoutModal: boolean;
|
|
16
16
|
url: string;
|
|
17
17
|
by: string;
|
|
18
|
+
backText: string;
|
|
18
19
|
autoReload: boolean;
|
|
19
20
|
verified: EventEmitter;
|
|
21
|
+
backClicked: EventEmitter;
|
|
20
22
|
constructor();
|
|
21
23
|
getCode(): Promise<string>;
|
|
22
24
|
show(data: any): Promise<any>;
|
|
@@ -40,6 +40,7 @@ export namespace Components {
|
|
|
40
40
|
"bySMSText": string;
|
|
41
41
|
"emailLabel": string;
|
|
42
42
|
"enterText": string;
|
|
43
|
+
"isLoginByMail": boolean;
|
|
43
44
|
"loginText": string;
|
|
44
45
|
"loginTypeTitle": string;
|
|
45
46
|
"mobileLabel": string;
|
|
@@ -65,7 +66,7 @@ export namespace Components {
|
|
|
65
66
|
"width": 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
66
67
|
}
|
|
67
68
|
interface SallaOffer {
|
|
68
|
-
"show": (
|
|
69
|
+
"show": (productId: number) => Promise<void>;
|
|
69
70
|
}
|
|
70
71
|
interface SallaProductAvailability {
|
|
71
72
|
"buttonText": string;
|
|
@@ -119,6 +120,7 @@ export namespace Components {
|
|
|
119
120
|
}
|
|
120
121
|
interface SallaVerify {
|
|
121
122
|
"autoReload": boolean;
|
|
123
|
+
"backText": string;
|
|
122
124
|
"by": string;
|
|
123
125
|
"getCode": () => Promise<string>;
|
|
124
126
|
"show": (data: any) => Promise<any>;
|
|
@@ -229,6 +231,7 @@ declare namespace LocalJSX {
|
|
|
229
231
|
"bySMSText"?: string;
|
|
230
232
|
"emailLabel"?: string;
|
|
231
233
|
"enterText"?: string;
|
|
234
|
+
"isLoginByMail"?: boolean;
|
|
232
235
|
"loginText"?: string;
|
|
233
236
|
"loginTypeTitle"?: string;
|
|
234
237
|
"mobileLabel"?: string;
|
|
@@ -300,7 +303,9 @@ declare namespace LocalJSX {
|
|
|
300
303
|
}
|
|
301
304
|
interface SallaVerify {
|
|
302
305
|
"autoReload"?: boolean;
|
|
306
|
+
"backText"?: string;
|
|
303
307
|
"by"?: string;
|
|
308
|
+
"onBackClicked"?: (event: CustomEvent<any>) => void;
|
|
304
309
|
"onVerified"?: (event: CustomEvent<any>) => void;
|
|
305
310
|
"url"?: string;
|
|
306
311
|
/**
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
class Helper extends salla.AppHelpers {
|
|
4
|
-
setHost(host) {
|
|
5
|
-
this.host = host;
|
|
6
|
-
}
|
|
7
|
-
getElement(selector) {
|
|
8
|
-
return this.host.querySelector(selector);
|
|
9
|
-
}
|
|
10
|
-
getAttribute(selector, attribute) {
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = this.getElement(selector)) === null || _a === void 0 ? void 0 : _a.getAttribute(attribute);
|
|
13
|
-
}
|
|
14
|
-
val(selector) {
|
|
15
|
-
return this.getAttribute(selector, 'value');
|
|
16
|
-
}
|
|
17
|
-
isUser() {
|
|
18
|
-
return !!salla.config.is_user;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const Helper$1 = new Helper;
|
|
22
|
-
|
|
23
|
-
exports.Helper = Helper$1;
|