@zohodesk/components 1.0.0-temp-220.11 → 1.0.0-temp-231

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.
Files changed (62) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +17 -1
  3. package/assets/Appearance/dark/mode/Component_DarkMode.module.css +2 -2
  4. package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +1 -1
  5. package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +1 -1
  6. package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +1 -1
  7. package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +1 -1
  8. package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +1 -1
  9. package/assets/Appearance/light/mode/Component_LightMode.module.css +2 -2
  10. package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +1 -1
  11. package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +1 -1
  12. package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +1 -1
  13. package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +1 -1
  14. package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +1 -1
  15. package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +2 -2
  16. package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +1 -1
  17. package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +1 -1
  18. package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +1 -1
  19. package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +1 -1
  20. package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +1 -1
  21. package/es/Accordion/Accordion.js +1 -1
  22. package/es/AppContainer/AppContainer.js +1 -1
  23. package/es/Card/Card.js +48 -14
  24. package/es/Card/__tests__/Card.spec.js +81 -2
  25. package/es/Card/__tests__/__snapshots__/Card.spec.js.snap +44 -0
  26. package/es/Card/props/defaultProps.js +2 -1
  27. package/es/Card/props/propTypes.js +2 -1
  28. package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +7 -0
  29. package/es/MultiSelect/MultiSelect.js +1 -1
  30. package/es/Popup/Popup.js +3 -3
  31. package/es/Select/Select.js +1 -1
  32. package/es/Select/__tests__/Select.spec.js +15 -0
  33. package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +281 -0
  34. package/es/common/basic.module.css +0 -2
  35. package/es/components_layer.module.css +1 -0
  36. package/es/v1/Popup/Popup.js +1 -1
  37. package/es/v1/Select/Select.js +1 -1
  38. package/lib/Accordion/Accordion.js +2 -2
  39. package/lib/AppContainer/AppContainer.js +1 -1
  40. package/lib/Card/Card.js +64 -30
  41. package/lib/Card/__tests__/Card.spec.js +118 -1
  42. package/lib/Card/__tests__/__snapshots__/Card.spec.js.snap +44 -0
  43. package/lib/Card/props/defaultProps.js +2 -1
  44. package/lib/Card/props/propTypes.js +2 -1
  45. package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +7 -0
  46. package/lib/MultiSelect/MultiSelect.js +2 -2
  47. package/lib/Popup/Popup.js +4 -4
  48. package/lib/Select/Select.js +2 -2
  49. package/lib/Select/__tests__/Select.spec.js +165 -148
  50. package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +281 -0
  51. package/lib/common/basic.module.css +0 -2
  52. package/lib/components_layer.module.css +1 -0
  53. package/lib/v1/Popup/Popup.js +2 -2
  54. package/lib/v1/Select/Select.js +2 -2
  55. package/package.json +27 -13
  56. package/css_error.log +0 -1
  57. package/install.md +0 -10
  58. package/postPublish.js +0 -8
  59. package/prePublish.js +0 -70
  60. package/react-cli.config.js +0 -24
  61. package/result.json +0 -1
  62. /package/.cli/{stringContains.js → themeValidate/stringContains.js} +0 -0
@@ -1,13 +1,25 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  var _react = _interopRequireDefault(require("react"));
4
6
 
5
7
  var _react2 = require("@testing-library/react");
6
8
 
7
- var _Card = _interopRequireDefault(require("../Card"));
9
+ var _Card = _interopRequireWildcard(require("../Card"));
10
+
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
8
14
 
9
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
16
 
17
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
18
+
19
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
20
+
21
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
22
+
11
23
  describe('Card', function () {
12
24
  test('rendering the defult props', function () {
13
25
  var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], null)),
@@ -15,4 +27,109 @@ describe('Card', function () {
15
27
 
16
28
  expect(asFragment()).toMatchSnapshot();
17
29
  });
30
+ test('should trigger fetch, when scroll to the bottom of the card while isRecentOnBottom = false', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
31
+ var mockGetNextOptions, _render2, getByTestId, asFragment, cardContent;
32
+
33
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
34
+ while (1) {
35
+ switch (_context.prev = _context.next) {
36
+ case 0:
37
+ mockGetNextOptions = jest.fn(function () {
38
+ return new Promise(function (resolve) {
39
+ resolve();
40
+ });
41
+ });
42
+ _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], {
43
+ from: 0,
44
+ limit: 10,
45
+ fetchData: mockGetNextOptions
46
+ }, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
47
+ dataId: "scrollToBottomCardContent"
48
+ }, /*#__PURE__*/_react["default"].createElement("div", null, "Hello Zam")))), getByTestId = _render2.getByTestId, asFragment = _render2.asFragment;
49
+ cardContent = getByTestId('scrollToBottomCardContent');
50
+ Object.defineProperty(cardContent, 'scrollHeight', {
51
+ value: 1000,
52
+ writable: true
53
+ });
54
+ Object.defineProperty(cardContent, 'clientHeight', {
55
+ value: 600,
56
+ writable: true
57
+ });
58
+ Object.defineProperty(cardContent, 'offsetHeight', {
59
+ value: 600,
60
+ writable: true
61
+ });
62
+
63
+ _react2.fireEvent.scroll(cardContent, {
64
+ target: {
65
+ scrollTop: 401
66
+ }
67
+ });
68
+
69
+ _context.next = 9;
70
+ return (0, _react2.waitFor)(function () {
71
+ expect(asFragment()).toMatchSnapshot();
72
+ expect(mockGetNextOptions).toHaveBeenCalledWith(10, 40, 'down');
73
+ });
74
+
75
+ case 9:
76
+ case "end":
77
+ return _context.stop();
78
+ }
79
+ }
80
+ }, _callee);
81
+ })));
82
+ test('should trigger fetch, when scroll to the top of the card while scrollDirection = bottomToTop', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
83
+ var mockGetNextOptions, _render3, getByTestId, asFragment, cardContent;
84
+
85
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
86
+ while (1) {
87
+ switch (_context2.prev = _context2.next) {
88
+ case 0:
89
+ mockGetNextOptions = jest.fn(function () {
90
+ return new Promise(function (resolve) {
91
+ resolve();
92
+ });
93
+ });
94
+ _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Card["default"], {
95
+ from: 0,
96
+ limit: 10,
97
+ scrollDirection: "bottomToTop",
98
+ fetchData: mockGetNextOptions
99
+ }, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
100
+ dataId: "scrollToTopCardContent"
101
+ }, /*#__PURE__*/_react["default"].createElement("div", null, "Hello Zam")))), getByTestId = _render3.getByTestId, asFragment = _render3.asFragment;
102
+ cardContent = getByTestId('scrollToTopCardContent');
103
+ Object.defineProperty(cardContent, 'scrollHeight', {
104
+ value: 1000,
105
+ writable: true
106
+ });
107
+ Object.defineProperty(cardContent, 'clientHeight', {
108
+ value: 600,
109
+ writable: true
110
+ });
111
+ Object.defineProperty(cardContent, 'offsetHeight', {
112
+ value: 600,
113
+ writable: true
114
+ });
115
+
116
+ _react2.fireEvent.scroll(cardContent, {
117
+ target: {
118
+ scrollTop: 0
119
+ }
120
+ });
121
+
122
+ _context2.next = 9;
123
+ return (0, _react2.waitFor)(function () {
124
+ expect(asFragment()).toMatchSnapshot();
125
+ expect(mockGetNextOptions).toHaveBeenCalledWith(10, 40, 'up');
126
+ });
127
+
128
+ case 9:
129
+ case "end":
130
+ return _context2.stop();
131
+ }
132
+ }
133
+ }, _callee2);
134
+ })));
18
135
  });
@@ -10,3 +10,47 @@ exports[`Card rendering the defult props 1`] = `
10
10
  />
11
11
  </DocumentFragment>
12
12
  `;
13
+
14
+ exports[`Card should trigger fetch, when scroll to the bottom of the card while isRecentOnBottom = false 1`] = `
15
+ <DocumentFragment>
16
+ <div
17
+ class="flex cover coldir"
18
+ data-id="containerComponent"
19
+ data-selector-id="container"
20
+ data-test-id="containerComponent"
21
+ >
22
+ <div
23
+ class="grow basis shrinkOff scrolly"
24
+ data-id="scrollToBottomCardContent"
25
+ data-selector-id="cardContent"
26
+ data-test-id="scrollToBottomCardContent"
27
+ >
28
+ <div>
29
+ Hello Zam
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </DocumentFragment>
34
+ `;
35
+
36
+ exports[`Card should trigger fetch, when scroll to the top of the card while scrollDirection = bottomToTop 1`] = `
37
+ <DocumentFragment>
38
+ <div
39
+ class="flex cover coldir"
40
+ data-id="containerComponent"
41
+ data-selector-id="container"
42
+ data-test-id="containerComponent"
43
+ >
44
+ <div
45
+ class="grow basis shrinkOff scrolly"
46
+ data-id="scrollToTopCardContent"
47
+ data-selector-id="cardContent"
48
+ data-test-id="scrollToTopCardContent"
49
+ >
50
+ <div>
51
+ Hello Zam
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </DocumentFragment>
56
+ `;
@@ -10,7 +10,8 @@ var Card_defaultProps = {
10
10
  onClick: null,
11
11
  scrollAt: '10',
12
12
  a11y: {},
13
- isPercentageScroll: false
13
+ isPercentageScroll: false,
14
+ scrollDirection: 'topToBottom'
14
15
  };
15
16
  exports.Card_defaultProps = Card_defaultProps;
16
17
  var CardHeader_defaultProps = {
@@ -50,7 +50,8 @@ var Card_propTypes = {
50
50
  role: _propTypes["default"].string
51
51
  }),
52
52
  isPercentageScroll: _propTypes["default"].bool,
53
- eleRef: _propTypes["default"].func
53
+ eleRef: _propTypes["default"].func,
54
+ scrollDirection: _propTypes["default"].oneOf(['topToBottom', 'bottomToTop'])
54
55
  };
55
56
  exports.Card_propTypes = Card_propTypes;
56
57
  var CardFooter_propTypes = {
@@ -18,6 +18,11 @@
18
18
  box-shadow: var(--dropbox_box_shadow);
19
19
  }
20
20
 
21
+ .defaultPalette,
22
+ .darkPalette {
23
+ /*css:theme-validation:ignore*/
24
+ }
25
+
21
26
  .defaultPalette, .darkPalette {
22
27
  background-color: var(--dropbox_bg_color);
23
28
  }
@@ -207,6 +212,7 @@
207
212
  height: var(--zd_size10) ;
208
213
  width: var(--zd_size10) ;
209
214
  box-shadow: 1px -1px 2px 0 var(--dropbox_arrow_box_shadow_color);
215
+ /*css:theme-validation:ignore*/
210
216
  background-color: var(--dropbox_bg_color);
211
217
  -webkit-transform: rotateZ(-45deg);
212
218
  transform: rotateZ(-45deg);
@@ -419,6 +425,7 @@
419
425
  .closeBar {
420
426
  /* Variable:Ignore */
421
427
  height: 6px;
428
+ /*css:theme-validation:ignore*/
422
429
  width: 20% ;
423
430
  border-radius: 5px;
424
431
  background-color: var(--dropbox_mob_close_bg_color);
@@ -172,8 +172,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
172
172
  // suggestionContainer.addEventListener('scroll', this.handleScroll);
173
173
  }
174
174
  }, {
175
- key: "componentWillReceiveProps",
176
- value: function componentWillReceiveProps(nextProps) {
175
+ key: "UNSAFE_componentWillReceiveProps",
176
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
177
177
  var _this2 = this;
178
178
 
179
179
  var selectedOptions = nextProps.selectedOptions,
@@ -279,8 +279,8 @@ var Popup = function Popup(Component) {
279
279
  }
280
280
  }
281
281
  }, {
282
- key: "componentWillReceiveProps",
283
- value: function componentWillReceiveProps(nextProps) {
282
+ key: "UNSAFE_componentWillReceiveProps",
283
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
284
284
  var isPopupOpen = this.state.isPopupOpen;
285
285
 
286
286
  if (typeof nextProps.isPopupOpen !== 'undefined' && nextProps.isPopupOpen !== isPopupOpen) {
@@ -661,10 +661,10 @@ var Popup = function Popup(Component) {
661
661
 
662
662
  if (entry.isIntersecting === true) {
663
663
  this.isTargetElementVisible = true;
664
- dropElement && dropElement.setAttribute('data-visible', 'visible');
664
+ dropElement.setAttribute('data-visible', 'visible');
665
665
  } else if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
666
666
  this.isTargetElementVisible = false;
667
- dropElement && dropElement.setAttribute('data-visible', 'hidden');
667
+ dropElement.setAttribute('data-visible', 'hidden');
668
668
  }
669
669
  }
670
670
  }, {
@@ -184,8 +184,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
184
184
  // suggestionContainer.addEventListener('scroll', this.handleScroll);
185
185
  }
186
186
  }, {
187
- key: "componentWillReceiveProps",
188
- value: function componentWillReceiveProps(nextProps) {
187
+ key: "UNSAFE_componentWillReceiveProps",
188
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
189
189
  var selectedValue = nextProps.selectedValue,
190
190
  isDefaultSelectValue = nextProps.isDefaultSelectValue,
191
191
  valueField = nextProps.valueField,