@salla.sa/twilight 1.0.18 → 1.6.13
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/LICENSE.md +674 -0
- package/README.md +214 -4
- package/dist/@salla.sa/twilight.min.js +20 -0
- package/dist/@salla.sa/twilight.min.js.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +64 -52
- package/types/actions.d.ts +47 -0
- package/types/api/auth/index.d.ts +17 -0
- package/types/api/auth/request.d.ts +42 -0
- package/types/api/auth/response.d.ts +22 -0
- package/types/api/cart/index.d.ts +24 -0
- package/types/api/cart/request.d.ts +8 -0
- package/types/api/cart/response.d.ts +66 -0
- package/types/api/comment.d.ts +18 -0
- package/types/api/currency.d.ts +17 -0
- package/types/api/document.d.ts +3 -0
- package/types/api/index.d.ts +110 -0
- package/types/api/loyalty.d.ts +226 -0
- package/types/api/order.d.ts +15 -0
- package/types/api/product/index.d.ts +17 -0
- package/types/api/product/request.d.ts +53 -0
- package/types/api/product/response.d.ts +103 -0
- package/types/api/profile.d.ts +50 -0
- package/types/api/rating.d.ts +49 -0
- package/types/api/scope.d.ts +42 -0
- package/types/api/wishlist.d.ts +7 -0
- package/types/common.d.ts +75 -0
- package/types/event/auth.d.ts +18 -0
- package/types/event/cart.d.ts +30 -0
- package/types/event/comment.d.ts +7 -0
- package/types/event/currency.d.ts +9 -0
- package/types/event/document.d.ts +29 -0
- package/types/event/index.d.ts +48 -0
- package/types/event/infiniteScroll.d.ts +12 -0
- package/types/event/loyalty.d.ts +14 -0
- package/types/event/order.d.ts +11 -0
- package/types/event/product.d.ts +30 -0
- package/types/event/profile.d.ts +13 -0
- package/types/event/rating.d.ts +13 -0
- package/types/event/scope.d.ts +15 -0
- package/types/event/wishlist.d.ts +8 -0
- package/types/helpers/app-helpers.d.ts +29 -0
- package/types/index.d.ts +36 -0
- package/types/lib/config.ts +14 -0
- package/types/lib/form.d.ts +8 -0
- package/types/lib/lang.d.ts +14 -0
- package/types/lib/notify.d.ts +14 -0
- package/types/tiwlight-config.d.ts +74 -0
- package/watcher.js +64 -22
- package/components/README.md +0 -55
- package/components/dist/cjs/index-9441fd8e.js +0 -1554
- package/components/dist/cjs/index.cjs.js +0 -2
- package/components/dist/cjs/loader.cjs.js +0 -21
- package/components/dist/cjs/salla-login_2.cjs.entry.js +0 -131
- package/components/dist/cjs/twilight-components.cjs.js +0 -19
- package/components/dist/collection/collection-manifest.json +0 -13
- package/components/dist/collection/components/generate-summary.js +0 -35
- package/components/dist/collection/components/salla-login/salla-login.css +0 -104
- package/components/dist/collection/components/salla-login/salla-login.js +0 -113
- package/components/dist/collection/components/search-modal/search-modal.css +0 -9
- package/components/dist/collection/components/search-modal/search-modal.js +0 -161
- package/components/dist/collection/index.js +0 -1
- package/components/dist/collection/interfaces/colors.js +0 -1
- package/components/dist/collection/interfaces/index.js +0 -2
- package/components/dist/collection/interfaces/ratio.js +0 -1
- package/components/dist/collection/plugins/tailwind-theme/index.js +0 -32
- package/components/dist/collection/plugins/tailwind-theme/scripts/generator.js +0 -51
- package/components/dist/collection/utils/utils.js +0 -16
- package/components/dist/esm/index-63e5409f.js +0 -1527
- package/components/dist/esm/index.js +0 -1
- package/components/dist/esm/loader.js +0 -17
- package/components/dist/esm/polyfills/core-js.js +0 -11
- package/components/dist/esm/polyfills/css-shim.js +0 -1
- package/components/dist/esm/polyfills/dom.js +0 -79
- package/components/dist/esm/polyfills/es5-html-element.js +0 -1
- package/components/dist/esm/polyfills/index.js +0 -34
- package/components/dist/esm/polyfills/system.js +0 -6
- package/components/dist/esm/salla-login_2.entry.js +0 -126
- package/components/dist/esm/twilight-components.js +0 -17
- package/components/dist/index.cjs.js +0 -1
- package/components/dist/index.js +0 -1
- package/components/dist/twilight-components/index.esm.js +0 -0
- package/components/dist/twilight-components/p-3d53781c.js +0 -1
- package/components/dist/twilight-components/p-fccb89fa.entry.js +0 -1
- package/components/dist/twilight-components/twilight-components.esm.js +0 -1
- package/components/dist/types/components/salla-login/salla-login.d.ts +0 -14
- package/components/dist/types/components/search-modal/search-modal.d.ts +0 -26
- package/components/dist/types/components.d.ts +0 -76
- package/components/dist/types/index.d.ts +0 -6
- package/components/dist/types/interfaces/colors.d.ts +0 -1
- package/components/dist/types/interfaces/index.d.ts +0 -2
- package/components/dist/types/interfaces/ratio.d.ts +0 -1
- package/components/dist/types/stencil-public-runtime.d.ts +0 -1563
- package/components/dist/types/utils/utils.d.ts +0 -6
- package/components/loader/cdn.js +0 -3
- package/components/loader/index.cjs.js +0 -3
- package/components/loader/index.d.ts +0 -13
- package/components/loader/index.es2017.js +0 -3
- package/components/loader/index.js +0 -4
- package/components/loader/package.json +0 -10
- package/components/package.json +0 -70
- package/components/src/plugins/tailwind-theme/index.js +0 -32
- package/components/src/plugins/tailwind-theme/package.json +0 -27
- package/components/src/plugins/tailwind-theme/readme.md +0 -47
- package/components/src/plugins/tailwind-theme/safe-list-css.txt +0 -19
- package/components/src/plugins/tailwind-theme/utilities.json +0 -1
- package/components.js +0 -1
- package/dist/twilight.js +0 -1239
- package/postInstall.js +0 -2
- package/tailwind.js +0 -1
- package/tailwind_css_list.js +0 -1
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var fs = require('fs');
|
|
2
|
-
var path = require('path');
|
|
3
|
-
var _ = require('lodash');
|
|
4
|
-
var components = {};
|
|
5
|
-
fs.readdirSync(path.resolve(__dirname, './../'), {withFileTypes: true}).filter(dirent => dirent.isDirectory()).forEach(directory => {
|
|
6
|
-
try {
|
|
7
|
-
components[directory.name] = JSON.parse(fs.readFileSync(path.resolve(__dirname + '/../' + directory.name, 'utilities.json'), 'UTF-8'));
|
|
8
|
-
} catch (e) {
|
|
9
|
-
// ignore
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var utilities = {};
|
|
14
|
-
|
|
15
|
-
for (const [keyComponent, value] of Object.entries(components)) {
|
|
16
|
-
console.log('> Processing ' + keyComponent + ' ...');
|
|
17
|
-
_.forEach(value, function(value, keyUtility) {
|
|
18
|
-
keyUtility = '.s-' + keyComponent + '-' + keyUtility;
|
|
19
|
-
utilities[keyUtility] = {[`@apply ${value}`]: {}};
|
|
20
|
-
});
|
|
21
|
-
console.log('✓ Processed ' + keyComponent + '');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// write the utilities for the plugin
|
|
25
|
-
console.log('> Write utilities ...');
|
|
26
|
-
fs.writeFileSync(
|
|
27
|
-
path.resolve(__dirname, './../utilities.json'),
|
|
28
|
-
JSON.stringify(utilities),
|
|
29
|
-
function(err) {
|
|
30
|
-
if (err) {
|
|
31
|
-
return console.log(err);
|
|
32
|
-
}
|
|
33
|
-
console.log('The file was saved!');
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// write the save list css
|
|
39
|
-
console.log('> Write safe-list-css ...');
|
|
40
|
-
fs.writeFileSync(
|
|
41
|
-
path.resolve(__dirname, './../safe-list-css.txt'),
|
|
42
|
-
Object.keys(utilities).map((name) => name.replace('.','')).join('\n'),
|
|
43
|
-
function(err) {
|
|
44
|
-
if (err) {
|
|
45
|
-
return console.log(err);
|
|
46
|
-
}
|
|
47
|
-
console.log('The file was saved!');
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
console.log('✓ Done ...');
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export function format(first, middle, last) {
|
|
2
|
-
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
3
|
-
}
|
|
4
|
-
export const toInteger = (value, defaultValue = NaN) => {
|
|
5
|
-
const integer = parseInt(value, 10);
|
|
6
|
-
return isNaN(integer) ? defaultValue : integer;
|
|
7
|
-
};
|
|
8
|
-
export const validateInput = event => {
|
|
9
|
-
const isValid = true;
|
|
10
|
-
const errors = [];
|
|
11
|
-
// check if email or url matched
|
|
12
|
-
if (event.target.validity.typeMismatch) {
|
|
13
|
-
errors.push('mismatched');
|
|
14
|
-
}
|
|
15
|
-
return { isValid, errors };
|
|
16
|
-
};
|