@airtable/blocks 1.14.0 → 1.16.0

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.
@@ -478,7 +478,7 @@ function (_AbstractModel) {
478
478
  * "synced" if it's source is from another airtable base or external data source
479
479
  * like Google Calendar, Jira, etc..
480
480
  *
481
- * @hidden
481
+ * @hidden
482
482
  */
483
483
 
484
484
  }, {
@@ -530,7 +530,11 @@ function (_AbstractModel) {
530
530
  value: function convertStringToCellValue(string) {
531
531
  var airtableInterface = this._sdk.__airtableInterface;
532
532
  var appInterface = this._sdk.__appInterface;
533
- var cellValue = airtableInterface.fieldTypeProvider.convertStringToCellValue(appInterface, string, this._data); // Temporarily bail out of validating computed values (since validation will crash)
533
+ var cellValue = airtableInterface.fieldTypeProvider.convertStringToCellValue(appInterface, string, this._data, // The opt parseDateCellValueInColumnTimeZone is used here to ensure date string
534
+ // inputs are interpreted correctly according to the `timeZone` of the dateTime field.
535
+ {
536
+ parseDateCellValueInColumnTimeZone: this.type === _field.FieldType.DATE_TIME
537
+ }); // Temporarily bail out of validating computed values (since validation will crash)
534
538
  // while we work out if we actually have to validate or not. Ideally we just delete all
535
539
  // the validation
536
540
  // TODO(emma): delete me or tidy me up
@@ -942,7 +942,10 @@ function (_AbstractModel) {
942
942
  return _regenerator.default.awrap(this._sdk.__mutations.applyMutationAsync({
943
943
  type: _mutations.MutationTypes.SET_MULTIPLE_RECORDS_CELL_VALUES,
944
944
  tableId: this.id,
945
- records: recordsWithCellValuesByFieldId
945
+ records: recordsWithCellValuesByFieldId,
946
+ opts: {
947
+ parseDateCellValueInColumnTimeZone: true
948
+ }
946
949
  }));
947
950
 
948
951
  case 3:
@@ -1593,7 +1596,10 @@ function (_AbstractModel) {
1593
1596
  return _regenerator.default.awrap(this._sdk.__mutations.applyMutationAsync({
1594
1597
  type: _mutations.MutationTypes.CREATE_MULTIPLE_RECORDS,
1595
1598
  tableId: this.id,
1596
- records: recordsToCreate
1599
+ records: recordsToCreate,
1600
+ opts: {
1601
+ parseDateCellValueInColumnTimeZone: true
1602
+ }
1597
1603
  }));
1598
1604
 
1599
1605
  case 3:
package/dist/cjs/sdk.js CHANGED
@@ -337,4 +337,4 @@ function () {
337
337
  }();
338
338
 
339
339
  exports.default = BlockSdk;
340
- (0, _defineProperty2.default)(BlockSdk, "VERSION", "1.14.0");
340
+ (0, _defineProperty2.default)(BlockSdk, "VERSION", "1.16.0");
@@ -100,11 +100,9 @@ var Icon = (props, ref) => {
100
100
  var classNameForStyleProps = (0, _use_styled_system.default)(_objectSpread({}, styleProps, {
101
101
  width: size,
102
102
  height: size
103
- }), styleParser); // TODO (jay): Figure out how we can support micro icons when the size is in relative ems.
104
-
105
- var isMicro = typeof size === 'string' ? false : size <= 12;
106
- var iconName = "".concat(name).concat(isMicro ? 'Micro' : '');
107
- var pathData = _icon_config.allIconPaths[iconName];
103
+ }), styleParser);
104
+ var phosphorIconName = _icon_config.legacyIconNameToPhosphorIconName[name];
105
+ var pathData = phosphorIconName ? _icon_config.phosphorIconConfig[phosphorIconName] : null;
108
106
 
109
107
  if (!pathData) {
110
108
  return null;
@@ -122,10 +120,9 @@ var Icon = (props, ref) => {
122
120
  (0, _warning.default)("'".concat(name, "' as an icon name is deprecated. ").concat(alternativeText));
123
121
  }
124
122
 
125
- var originalSize = isMicro ? 12 : 16;
126
123
  return _react.default.createElement("svg", {
127
124
  ref: ref,
128
- viewBox: "0 0 ".concat(originalSize, " ").concat(originalSize) // TODO (stephen): remove tooltip anchor props
125
+ viewBox: "0 0 16 16" // TODO (stephen): remove tooltip anchor props
129
126
  ,
130
127
  onMouseEnter: onMouseEnter,
131
128
  onMouseLeave: onMouseLeave,