@elliemae/ds-loading-indicator 3.0.0-alpha.0 → 3.0.0-alpha.1

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.
@@ -2,9 +2,35 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
7
21
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
31
+ }
32
+ return target;
33
+ };
8
34
  var __export = (target, all) => {
9
35
  for (var name in all)
10
36
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,22 +65,29 @@ var import_ds_spinner = __toESM(require("@elliemae/ds-spinner"));
39
65
  var import_ds_overlay = __toESM(require("@elliemae/ds-overlay"));
40
66
  const blockName = "loading-indicator";
41
67
  const Container = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
42
- const DSLoadingIndicator = ({
43
- innerRef,
44
- size = "l",
45
- loading = false,
46
- message = null,
47
- hasBackdrop = true,
48
- onClickOutside = () => null,
49
- spinner,
50
- ...rest
51
- }) => {
52
- const spinnerComponent = spinner || /* @__PURE__ */ import_react.default.createElement(import_ds_spinner.default, {
68
+ const DSLoadingIndicator = (_a) => {
69
+ var _b = _a, {
70
+ innerRef,
71
+ size = "l",
72
+ loading = false,
73
+ message = null,
74
+ hasBackdrop = true,
75
+ onClickOutside = () => null,
76
+ spinner
77
+ } = _b, rest = __objRest(_b, [
78
+ "innerRef",
79
+ "size",
80
+ "loading",
81
+ "message",
82
+ "hasBackdrop",
83
+ "onClickOutside",
84
+ "spinner"
85
+ ]);
86
+ const spinnerComponent = spinner || /* @__PURE__ */ import_react.default.createElement(import_ds_spinner.default, __spreadValues({
53
87
  innerRef,
54
88
  message,
55
- size,
56
- ...rest
57
- });
89
+ size
90
+ }, rest));
58
91
  return /* @__PURE__ */ import_react.default.createElement(import_ds_overlay.default, {
59
92
  backDropZIndex: 200,
60
93
  hasBackdrop,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSLoadingIndicator.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSSpinner from '@elliemae/ds-spinner';\nimport DSOverlay from '@elliemae/ds-overlay';\n\nconst blockName = 'loading-indicator';\n\nconst Container = aggregatedClasses('div')(blockName);\n\nconst DSLoadingIndicator = ({\n innerRef,\n size = 'l',\n loading = false,\n message = null,\n hasBackdrop = true,\n onClickOutside = () => null,\n spinner,\n ...rest\n}) => {\n const spinnerComponent = spinner || (\n <DSSpinner innerRef={innerRef} message={message} size={size} {...rest} />\n );\n return (\n <DSOverlay\n backDropZIndex={200} // https://jira.elliemae.io/browse/PUI-1712\n hasBackdrop={hasBackdrop}\n isOpen={loading}\n onClickOutside={onClickOutside}\n >\n <Container>{spinnerComponent}</Container>\n </DSOverlay>\n );\n};\n\nconst loadingIndicatorProps = {\n innerRef: PropTypes.func.description('Get spinner reference'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Size of the spinner')\n .defaultValue('l'),\n loading: PropTypes.bool\n .description('Whether to show the spinner or not')\n .defaultValue(false),\n message: PropTypes.string.description('Message below the spinner'),\n hasBackdrop: PropTypes.bool\n .description('Show a backdrop besides the spinner')\n .defaultValue(true),\n onClickOutside: PropTypes.func.description(\n 'Handler when a user clicks the outside the spinner',\n ),\n spinner: PropTypes.element.description('Render a custom spinner (JSX)'),\n};\n\nDSLoadingIndicator.propTypes = loadingIndicatorProps;\n\nconst LoadingIndicatorWithSchema = describe(DSLoadingIndicator);\nLoadingIndicatorWithSchema.propTypes = loadingIndicatorProps;\n\nexport { DSLoadingIndicator, LoadingIndicatorWithSchema };\nexport default DSLoadingIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAAkC;AAClC,wBAAsB;AACtB,wBAAsB;AAEtB,MAAM,YAAY;AAElB,MAAM,YAAY,4CAAkB,OAAO;AAE3C,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB;AAAA,KACG;AAAA,MACC;AACJ,QAAM,mBAAmB,WACvB,mDAAC,2BAAD;AAAA,IAAW;AAAA,IAAoB;AAAA,IAAkB;AAAA,OAAgB;AAAA;AAEnE,SACE,mDAAC,2BAAD;AAAA,IACE,gBAAgB;AAAA,IAChB;AAAA,IACA,Q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C,WAAD,MAAY;AAAA;AAKlB,MAAM,wBAAwB;AAAA,EAC5B,UAAU,4BAAU,KAAK,YAAY;AAAA,EACrC,MAAM,4BAAU,MAAM,CAAC,KAAK,KAAK,MAC9B,YAAY,uBACZ,aAAa;AAAA,EAChB,SAAS,4BAAU,KAChB,YAAY,sCACZ,aAAa;AAAA,EAChB,SAAS,4BAAU,OAAO,YAAY;AAAA,EACtC,aAAa,4BAAU,KACpB,YAAY,uCACZ,aAAa;AAAA,EAChB,gBAAgB,4BAAU,KAAK,YAC7B;AAAA,EAEF,SAAS,4BAAU,QAAQ,YAAY;AAAA;AAGzC,mBAAmB,YAAY;AAE/B,MAAM,6BAA6B,gCAAS;AAC5C,2BAA2B,YAAY;AAGvC,IAAO,6BAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,31 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+ var __objRest = (source, exclude) => {
18
+ var target = {};
19
+ for (var prop in source)
20
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
21
+ target[prop] = source[prop];
22
+ if (source != null && __getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(source)) {
24
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
25
+ target[prop] = source[prop];
26
+ }
27
+ return target;
28
+ };
1
29
  import * as React from "react";
2
30
  import React2 from "react";
3
31
  import { describe, PropTypes } from "react-desc";
@@ -6,22 +34,29 @@ import DSSpinner from "@elliemae/ds-spinner";
6
34
  import DSOverlay from "@elliemae/ds-overlay";
7
35
  const blockName = "loading-indicator";
8
36
  const Container = aggregatedClasses("div")(blockName);
9
- const DSLoadingIndicator = ({
10
- innerRef,
11
- size = "l",
12
- loading = false,
13
- message = null,
14
- hasBackdrop = true,
15
- onClickOutside = () => null,
16
- spinner,
17
- ...rest
18
- }) => {
19
- const spinnerComponent = spinner || /* @__PURE__ */ React2.createElement(DSSpinner, {
37
+ const DSLoadingIndicator = (_a) => {
38
+ var _b = _a, {
39
+ innerRef,
40
+ size = "l",
41
+ loading = false,
42
+ message = null,
43
+ hasBackdrop = true,
44
+ onClickOutside = () => null,
45
+ spinner
46
+ } = _b, rest = __objRest(_b, [
47
+ "innerRef",
48
+ "size",
49
+ "loading",
50
+ "message",
51
+ "hasBackdrop",
52
+ "onClickOutside",
53
+ "spinner"
54
+ ]);
55
+ const spinnerComponent = spinner || /* @__PURE__ */ React2.createElement(DSSpinner, __spreadValues({
20
56
  innerRef,
21
57
  message,
22
- size,
23
- ...rest
24
- });
58
+ size
59
+ }, rest));
25
60
  return /* @__PURE__ */ React2.createElement(DSOverlay, {
26
61
  backDropZIndex: 200,
27
62
  hasBackdrop,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSLoadingIndicator.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport DSSpinner from '@elliemae/ds-spinner';\nimport DSOverlay from '@elliemae/ds-overlay';\n\nconst blockName = 'loading-indicator';\n\nconst Container = aggregatedClasses('div')(blockName);\n\nconst DSLoadingIndicator = ({\n innerRef,\n size = 'l',\n loading = false,\n message = null,\n hasBackdrop = true,\n onClickOutside = () => null,\n spinner,\n ...rest\n}) => {\n const spinnerComponent = spinner || (\n <DSSpinner innerRef={innerRef} message={message} size={size} {...rest} />\n );\n return (\n <DSOverlay\n backDropZIndex={200} // https://jira.elliemae.io/browse/PUI-1712\n hasBackdrop={hasBackdrop}\n isOpen={loading}\n onClickOutside={onClickOutside}\n >\n <Container>{spinnerComponent}</Container>\n </DSOverlay>\n );\n};\n\nconst loadingIndicatorProps = {\n innerRef: PropTypes.func.description('Get spinner reference'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Size of the spinner')\n .defaultValue('l'),\n loading: PropTypes.bool\n .description('Whether to show the spinner or not')\n .defaultValue(false),\n message: PropTypes.string.description('Message below the spinner'),\n hasBackdrop: PropTypes.bool\n .description('Show a backdrop besides the spinner')\n .defaultValue(true),\n onClickOutside: PropTypes.func.description(\n 'Handler when a user clicks the outside the spinner',\n ),\n spinner: PropTypes.element.description('Render a custom spinner (JSX)'),\n};\n\nDSLoadingIndicator.propTypes = loadingIndicatorProps;\n\nconst LoadingIndicatorWithSchema = describe(DSLoadingIndicator);\nLoadingIndicatorWithSchema.propTypes = loadingIndicatorProps;\n\nexport { DSLoadingIndicator, LoadingIndicatorWithSchema };\nexport default DSLoadingIndicator;\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,YAAY,kBAAkB,OAAO;AAE3C,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB,MAAM;AAAA,EACvB;AAAA,KACG;AAAA,MACC;AACJ,QAAM,mBAAmB,WACvB,qCAAC,WAAD;AAAA,IAAW;AAAA,IAAoB;AAAA,IAAkB;AAAA,OAAgB;AAAA;AAEnE,SACE,qCAAC,WAAD;AAAA,IACE,gBAAgB;AAAA,IAChB;AAAA,IACA,QAAQ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,uBACZ,aAAa;AAAA,EAChB,SAAS,UAAU,KAChB,YAAY,sCACZ,aAAa;AAAA,EAChB,SAAS,UAAU,OAAO,YAAY;AAAA,EACtC,aAAa,UAAU,KACpB,YAAY,uCACZ,aAAa;AAAA,EAChB,gBAAgB,UAAU,KAAK,YAC7B;AAAA,EAEF,SAAS,UAAU,QAAQ,YAAY;AAAA;AAGzC,mBAAmB,YAAY;AAE/B,MAAM,6BAA6B,SAAS;AAC5C,2BAA2B,YAAY;AAGvC,IAAO,6BAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-loading-indicator",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Loading Indicator",
6
6
  "files": [
@@ -39,9 +39,9 @@
39
39
  "indent": 4
40
40
  },
41
41
  "dependencies": {
42
- "@elliemae/ds-classnames": "3.0.0-alpha.0",
43
- "@elliemae/ds-overlay": "3.0.0-alpha.0",
44
- "@elliemae/ds-spinner": "3.0.0-alpha.0",
42
+ "@elliemae/ds-classnames": "3.0.0-alpha.1",
43
+ "@elliemae/ds-overlay": "3.0.0-alpha.1",
44
+ "@elliemae/ds-spinner": "3.0.0-alpha.1",
45
45
  "react-desc": "~4.1.3"
46
46
  },
47
47
  "peerDependencies": {
@@ -56,6 +56,7 @@
56
56
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
57
57
  "test": "node ../../scripts/testing/test.mjs",
58
58
  "lint": "node ../../scripts/lint.mjs",
59
+ "dts": "node ../../scripts/dts.mjs",
59
60
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
60
61
  }
61
62
  }
@@ -1,56 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare const DSLoadingIndicator: {
4
- ({ innerRef, size, loading, message, hasBackdrop, onClickOutside, spinner, ...rest }: {
5
- [x: string]: any;
6
- innerRef: any;
7
- size?: string | undefined;
8
- loading?: boolean | undefined;
9
- message?: null | undefined;
10
- hasBackdrop?: boolean | undefined;
11
- onClickOutside?: (() => null) | undefined;
12
- spinner: any;
13
- }): JSX.Element;
14
- propTypes: {
15
- innerRef: {
16
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
17
- deprecated: import("react-desc").PropTypesDescValidator;
18
- };
19
- isRequired: import("react-desc").PropTypesDescValue;
20
- };
21
- size: {
22
- deprecated: import("react-desc").PropTypesDescValidator;
23
- };
24
- loading: {
25
- deprecated: import("react-desc").PropTypesDescValidator;
26
- };
27
- message: {
28
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
29
- deprecated: import("react-desc").PropTypesDescValidator;
30
- };
31
- isRequired: import("react-desc").PropTypesDescValue;
32
- };
33
- hasBackdrop: {
34
- deprecated: import("react-desc").PropTypesDescValidator;
35
- };
36
- onClickOutside: {
37
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
38
- deprecated: import("react-desc").PropTypesDescValidator;
39
- };
40
- isRequired: import("react-desc").PropTypesDescValue;
41
- };
42
- spinner: {
43
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
44
- deprecated: import("react-desc").PropTypesDescValidator;
45
- };
46
- isRequired: import("react-desc").PropTypesDescValue;
47
- };
48
- };
49
- };
50
- declare const LoadingIndicatorWithSchema: {
51
- (props?: unknown): JSX.Element;
52
- propTypes: unknown;
53
- toTypescript: () => import("react-desc").TypescriptSchema;
54
- };
55
- export { DSLoadingIndicator, LoadingIndicatorWithSchema };
56
- export default DSLoadingIndicator;
@@ -1,2 +0,0 @@
1
- export * from './DSLoadingIndicator';
2
- export { default } from './DSLoadingIndicator';