@memberstack/dom 1.9.27 → 1.9.28
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/lib/index.d.mts +644 -0
- package/lib/index.d.ts +629 -34
- package/lib/index.js +14863 -6
- package/lib/index.mjs +14835 -0
- package/package.json +16 -10
- package/lib/auth/index.d.ts +0 -7
- package/lib/auth/index.js +0 -85
- package/lib/constants/endpoints.d.ts +0 -3
- package/lib/constants/endpoints.js +0 -6
- package/lib/methods/dom/index.d.ts +0 -0
- package/lib/methods/dom/index.js +0 -0
- package/lib/methods/dom/main-dom.d.ts +0 -12
- package/lib/methods/dom/main-dom.js +0 -12976
- package/lib/methods/dom/methods.d.ts +0 -10
- package/lib/methods/dom/methods.js +0 -159
- package/lib/methods/index.d.ts +0 -56
- package/lib/methods/index.js +0 -96
- package/lib/methods/requests/index.d.ts +0 -52
- package/lib/methods/requests/index.js +0 -706
- package/lib/methods/requests/requests.d.ts +0 -27
- package/lib/methods/requests/requests.js +0 -122
- package/lib/types/index.d.ts +0 -2
- package/lib/types/index.js +0 -18
- package/lib/types/params.d.ts +0 -161
- package/lib/types/params.js +0 -2
- package/lib/types/payloads.d.ts +0 -56
- package/lib/types/payloads.js +0 -2
- package/lib/types/utils/payloads.d.ts +0 -259
- package/lib/types/utils/payloads.js +0 -3
- package/lib/utils/cookies.d.ts +0 -5
- package/lib/utils/cookies.js +0 -66
- package/lib/utils/defaultMessageBox.d.ts +0 -3
- package/lib/utils/defaultMessageBox.js +0 -42
- package/lib/utils/fileInput.d.ts +0 -1
- package/lib/utils/fileInput.js +0 -16
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberstack/dom",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.28",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
|
+
"module": "./lib/index.mjs",
|
|
6
|
+
"types": "./lib/index.d.ts",
|
|
5
7
|
"files": [
|
|
6
8
|
"lib/**/*"
|
|
7
9
|
],
|
|
@@ -13,20 +15,24 @@
|
|
|
13
15
|
"js-cookie": "^3.0.1"
|
|
14
16
|
},
|
|
15
17
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
+
"dev": "tsup --format esm,cjs --dts --watch --env.API_ENDPOINT=https://client.memberstack.com",
|
|
19
|
+
"build": "tsup --format esm,cjs --dts --env.API_ENDPOINT=https://client.memberstack.com",
|
|
20
|
+
"prepublishOnly": "yarn workspace prebuilt-uis build && yarn build:local",
|
|
21
|
+
"prepublishOnly:porter-prod": "yarn workspace prebuilt-uis build && tsup --format esm,cjs --dts --env.API_ENDPOINT=https://client.memberstack.com",
|
|
22
|
+
"prepublishOnly:porter-dev": "yarn workspace prebuilt-uis build && tsup --format esm,cjs --dts --env.API_ENDPOINT=https://dev-client.memberstack.com",
|
|
18
23
|
"watch": "tsc-watch",
|
|
19
|
-
"watch:dev": "
|
|
20
|
-
"watch:dev-ngrok": "
|
|
21
|
-
"watch:dev-api": "
|
|
22
|
-
"clean": "rm -rf node_modules",
|
|
23
|
-
"replace:vars:local": "ts-node utils/replaceDynamicVars -development",
|
|
24
|
+
"watch:dev": "tsup --format esm,cjs --dts --watch --env.API_ENDPOINT=http://localhost:3005",
|
|
25
|
+
"watch:dev-ngrok": "tsup --format esm,cjs --dts --watch --env.API_ENDPOINT=https://client-testing.ngrok.io",
|
|
26
|
+
"watch:dev-api": "tsup --format esm,cjs --dts --watch --env.API_ENDPOINT=https://dev-client.memberstack.com",
|
|
27
|
+
"clean": "rm -rf node_modules lib",
|
|
24
28
|
"deploy:latest": "npx np --tag latest --no-tests --any-branch",
|
|
25
29
|
"deploy:next": "npx np --tag next --no-tests --any-branch",
|
|
26
|
-
"build:local": "
|
|
30
|
+
"build:local": "tsup --format esm,cjs --dts"
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {
|
|
29
33
|
"replace-in-file": "^6.3.5",
|
|
30
|
-
"ts-jest": "^26.5.6"
|
|
34
|
+
"ts-jest": "^26.5.6",
|
|
35
|
+
"tsc-watch": "^6.0.4",
|
|
36
|
+
"tsup": "^7.2.0"
|
|
31
37
|
}
|
|
32
38
|
}
|
package/lib/auth/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const getPersistedMember: () => any;
|
|
2
|
-
export declare const setPersistedMember: (member: any) => void;
|
|
3
|
-
export declare const updatePersistedMember: (member: any) => void;
|
|
4
|
-
export declare const unsetPersistedMember: () => void;
|
|
5
|
-
export declare const onAuthChange: (cb: any) => {
|
|
6
|
-
unsubscribe: () => boolean;
|
|
7
|
-
};
|
package/lib/auth/index.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
-
if (!m) return o;
|
|
5
|
-
var i = m.call(o), r, ar = [], e;
|
|
6
|
-
try {
|
|
7
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
-
if (ar || !(i in from)) {
|
|
21
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
-
ar[i] = from[i];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.onAuthChange = exports.unsetPersistedMember = exports.updatePersistedMember = exports.setPersistedMember = exports.getPersistedMember = void 0;
|
|
29
|
-
var cookies_1 = require("../utils/cookies");
|
|
30
|
-
var createObservable = function () {
|
|
31
|
-
var observer = new Map();
|
|
32
|
-
return {
|
|
33
|
-
subscribe: function (key, fn) {
|
|
34
|
-
if (typeof fn !== "function")
|
|
35
|
-
return;
|
|
36
|
-
return observer.set(key, fn);
|
|
37
|
-
},
|
|
38
|
-
unsubscribe: function (key) {
|
|
39
|
-
return observer.delete(key);
|
|
40
|
-
},
|
|
41
|
-
notify: function (data) {
|
|
42
|
-
return __spreadArray([], __read(observer.values()), false).forEach(function (fn) { return fn(data); });
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
var observable = createObservable();
|
|
47
|
-
var getPersistedMember = function () {
|
|
48
|
-
return JSON.parse(localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem("_ms-mem"));
|
|
49
|
-
};
|
|
50
|
-
exports.getPersistedMember = getPersistedMember;
|
|
51
|
-
var setPersistedMember = function (member) {
|
|
52
|
-
if (member) {
|
|
53
|
-
var data = JSON.stringify(member);
|
|
54
|
-
if (data)
|
|
55
|
-
localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem("_ms-mem", data);
|
|
56
|
-
observable.notify(member);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
exports.setPersistedMember = setPersistedMember;
|
|
60
|
-
var updatePersistedMember = function (member) {
|
|
61
|
-
if (member) {
|
|
62
|
-
var data = JSON.stringify(member);
|
|
63
|
-
if (data)
|
|
64
|
-
localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem("_ms-mem", data);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem("_ms-mem");
|
|
68
|
-
(0, cookies_1.removeMemberToken)();
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
exports.updatePersistedMember = updatePersistedMember;
|
|
72
|
-
var unsetPersistedMember = function () {
|
|
73
|
-
localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem("_ms-mem");
|
|
74
|
-
(0, cookies_1.removeMemberToken)();
|
|
75
|
-
observable.notify(null);
|
|
76
|
-
};
|
|
77
|
-
exports.unsetPersistedMember = unsetPersistedMember;
|
|
78
|
-
var onAuthChange = function (cb) {
|
|
79
|
-
var id = Math.floor(Math.random() * 1000);
|
|
80
|
-
observable.subscribe(id, cb);
|
|
81
|
-
return {
|
|
82
|
-
unsubscribe: function () { return observable.unsubscribe(id); },
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
exports.onAuthChange = onAuthChange;
|
|
File without changes
|
package/lib/methods/dom/index.js
DELETED
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { Main as default };
|
|
2
|
-
declare class Main extends SvelteComponent {
|
|
3
|
-
constructor(options: any);
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Base class for Svelte components. Used when dev=false.
|
|
7
|
-
*/
|
|
8
|
-
declare class SvelteComponent {
|
|
9
|
-
$destroy(): void;
|
|
10
|
-
$on(type: any, callback: any): () => void;
|
|
11
|
-
$set($$props: any): void;
|
|
12
|
-
}
|