@esportsplus/ui 0.0.114 → 0.0.116

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.
@@ -0,0 +1,2 @@
1
+ declare const _default: (value: string) => void;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (value) => {
4
+ let input = document.createElement('INPUT');
5
+ document.body.appendChild(input);
6
+ input.setAttribute('value', value);
7
+ input.select();
8
+ document.execCommand('copy');
9
+ document.body.removeChild(input);
10
+ };
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ clipboard: (value: string) => void;
3
+ json: (content: any[] | Record<string, any>, name: string) => void;
4
+ };
5
+ export default _default;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const clipboard_1 = __importDefault(require("./clipboard"));
7
+ const json_1 = __importDefault(require("./json"));
8
+ exports.default = { clipboard: clipboard_1.default, json: json_1.default };
@@ -0,0 +1,2 @@
1
+ declare const _default: (content: any[] | Record<string, any>, name: string) => void;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = (content, name) => {
4
+ let link = document.createElement('a');
5
+ link.download = name + '.json';
6
+ link.href = window.URL.createObjectURL(new Blob([JSON.stringify(content)], { type: 'application/json' }));
7
+ document.body.appendChild(link);
8
+ link.click();
9
+ document.body.removeChild(link);
10
+ };
@@ -1,4 +1,5 @@
1
1
  export { default as alert } from './alert';
2
+ export { default as export } from './export';
2
3
  export { default as field } from './field';
3
4
  export { default as form } from './form';
4
5
  export { default as number } from './number';
@@ -3,9 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.tooltip = exports.site = exports.scrollbar = exports.root = exports.page = exports.number = exports.form = exports.field = exports.alert = void 0;
6
+ exports.tooltip = exports.site = exports.scrollbar = exports.root = exports.page = exports.number = exports.form = exports.field = exports.export = exports.alert = void 0;
7
7
  var alert_1 = require("./alert");
8
8
  Object.defineProperty(exports, "alert", { enumerable: true, get: function () { return __importDefault(alert_1).default; } });
9
+ var export_1 = require("./export");
10
+ Object.defineProperty(exports, "export", { enumerable: true, get: function () { return __importDefault(export_1).default; } });
9
11
  var field_1 = require("./field");
10
12
  Object.defineProperty(exports, "field", { enumerable: true, get: function () { return __importDefault(field_1).default; } });
11
13
  var form_1 = require("./form");
package/package.json CHANGED
@@ -2,12 +2,12 @@
2
2
  "author": "ICJR",
3
3
  "dependencies": {
4
4
  "@esportsplus/action": "^0.0.38",
5
- "@esportsplus/reactivity": "^0.1.18",
6
- "@esportsplus/template": "^0.1.29"
5
+ "@esportsplus/reactivity": "^0.1.19",
6
+ "@esportsplus/template": "^0.1.31"
7
7
  },
8
8
  "description": "UI",
9
9
  "devDependencies": {
10
- "@esportsplus/webpack": "^0.1.30",
10
+ "@esportsplus/webpack": "^0.1.31",
11
11
  "modern-normalize": "^2.0.0"
12
12
  },
13
13
  "main": "build/index.js",
@@ -21,5 +21,5 @@
21
21
  "prepublishOnly": "npm run build"
22
22
  },
23
23
  "types": "build/index.d.ts",
24
- "version": "0.0.114"
24
+ "version": "0.0.116"
25
25
  }
@@ -0,0 +1,12 @@
1
+ export default (value: string) => {
2
+ let input = document.createElement('INPUT') as HTMLInputElement;
3
+
4
+ document.body.appendChild(input);
5
+
6
+ input.setAttribute('value', value);
7
+ input.select();
8
+
9
+ document.execCommand('copy');
10
+
11
+ document.body.removeChild(input);
12
+ };
@@ -0,0 +1,5 @@
1
+ import clipboard from './clipboard';
2
+ import json from './json';
3
+
4
+
5
+ export default { clipboard, json };
@@ -0,0 +1,15 @@
1
+ export default (content: any[] | Record<string, any>, name: string) => {
2
+ let link = document.createElement('a');
3
+
4
+ link.download = name + '.json';
5
+ link.href = window.URL.createObjectURL(new Blob(
6
+ [ JSON.stringify(content) ],
7
+ { type: 'application/json' }
8
+ ));
9
+
10
+ document.body.appendChild(link);
11
+
12
+ link.click();
13
+
14
+ document.body.removeChild(link);
15
+ };
@@ -1,4 +1,5 @@
1
1
  export { default as alert }from './alert';
2
+ export { default as export }from './export';
2
3
  export { default as field }from './field';
3
4
  export { default as form }from './form';
4
5
  export { default as number }from './number';
package/webpack.config.ts CHANGED
@@ -1,11 +1,8 @@
1
1
  import { config, entry } from '@esportsplus/webpack';
2
2
 
3
3
 
4
- export default (env: { production?: boolean | string }) => {
5
- let production = env.production !== 'false';
6
-
4
+ export default ({ production }: { production?: string }) => {
7
5
  return config.web({
8
- cache: false,
9
6
  contenthash: false,
10
7
  entry: {
11
8
  css: {
@@ -23,7 +20,7 @@ export default (env: { production?: boolean | string }) => {
23
20
  }
24
21
  }
25
22
  },
26
- mode: production ? 'production': 'development',
23
+ mode: production !== 'false' ? 'production': 'development',
27
24
  // Temporary output until css root directory can be set through
28
25
  // package.json or similar ( like 'main' key )
29
26
  output: {
@@ -1,6 +0,0 @@
1
- type Data = {
2
- class?: string;
3
- content?: any;
4
- };
5
- declare const _default: (data?: Data) => import("@esportsplus/template/build/types").Renderable;
6
- export default _default;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const template_1 = require("@esportsplus/template");
4
- exports.default = (data = {}) => (0, template_1.html) `
5
- <section class='overlay ${data?.class || ''}'>
6
- ${data?.content || ''}
7
- </section>
8
- `;
@@ -1,6 +0,0 @@
1
- declare const _default: (data: {
2
- subtitle?: string;
3
- suptitle?: string;
4
- title?: string;
5
- }) => import("@esportsplus/template/build/types").Renderable;
6
- export default _default;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const template_1 = require("@esportsplus/template");
4
- exports.default = (data) => (0, template_1.html) `
5
- ${data?.suptitle ? (0, template_1.html) `
6
- <span class="page-suptitle --text-bold --text-crop --text-uppercase --text-200" style="--color-default: var(--color-primary-400);letter-spacing: 0.24px;">
7
- ${data?.suptitle}
8
- </span>
9
- ` : ''}
10
-
11
- ${data?.title ? (0, template_1.html) `
12
- <h1 class="page-title --line-height-200 --margin-300 ${!data?.subtitle && '--text-crop-bottom'} ${data?.suptitle ? '--margin-top' : '--text-crop-top'}">
13
- ${data?.title}
14
- </h1>
15
- ` : ''}
16
-
17
- ${data?.subtitle ? (0, template_1.html) `
18
- <span class="page-subtitle --margin-top --margin-300 --text-crop-bottom">
19
- ${data?.subtitle}
20
- </span>
21
- ` : ''}
22
- `;
@@ -1,5 +0,0 @@
1
- declare const _default: (data?: {
2
- class?: string;
3
- content?: any;
4
- }) => import("@esportsplus/template/build/types").Renderable;
5
- export default _default;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const template_1 = require("@esportsplus/template");
4
- exports.default = (data = {}) => (0, template_1.html) `
5
- <section class='page ${data?.class}'>
6
- ${data?.content}
7
- </section>
8
- `;