How to use the __assign function from tslib
Find comprehensive JavaScript tslib.__assign code examples handpicked from public code repositorys.
1839 1840 1841 1842 1843 1844 1845 1846 1847 1848
if (cancellationToken) { requestInit.signal = abortController.signal; } // Adds the user-agent header only if it has been specified (can't be forced in the browser) if (this_1._userAgent) { requestInit.headers = tslib.__assign(tslib.__assign({}, requestInit.headers), { 'User-Agent': this_1._userAgent }); } if (method === 'POST' || method === 'PUT') { requestInit.headers = tslib.__assign(tslib.__assign({}, requestInit.headers), { // Default posted MIME content type
2
8
2
+ 15 other calls in file
613 614 615 616 617 618 619 620 621 622
} else if ((typeof fs.ReadStream !== 'undefined' && request.file instanceof fs.ReadStream) || (typeof Buffer !== 'undefined' && request.file instanceof Buffer)) { // Node formData = new FormData(); // comes from the form-data package fillFormData(); headers = tslib.__assign({}, formData.getHeaders()); } else { throw new Error('data type is unsupported.'); }
2
8
2
+ 19 other calls in file
GitHub: hwyn/dynamic-builder
122 123 124 125 126 127 128 129 130 131
}; Action.prototype.executeAction = function (actionPropos, actionContext, _a) { var _b = _a === void 0 ? this.createEvent(void (0)) : _a, actionEvent = _b[0], otherEvent = _b.slice(1); var _c = (0, basic_extension_1.serializeAction)(actionPropos), _d = _c.name, name = _d === void 0 ? "" : _d, handler = _c.handler; var _e = name.match(/([^.]+)/ig) || [name], actionName = _e[0], _f = _e[1], execute = _f === void 0 ? 'execute' : _f; var context = tslib_1.__assign(tslib_1.__assign({}, actionContext), { actionPropos: actionPropos, actionEvent: actionEvent }); var ActionType = null; var executeHandler = handler; var action = new base_action_1.BaseAction(this.injector, context); var builder = action.builder;
0
2
1
+ 2 other calls in file
5558 5559 5560 5561 5562 5563 5564 5565 5566 5567
else if (typeof innerContent === 'object') { // look for a prop that would indicate a custom content handler is needed for (var contentKey in contentTypeHandlers) { if (innerContent[contentKey] !== undefined) { var stuff = contentTypeHandlers[contentKey](); customContentInfo = this.customContentInfo = tslib.__assign({ contentKey: contentKey, contentVal: innerContent[contentKey] }, stuff); break; } } }
0
0
1
+ 4756 other calls in file
8757 8758 8759 8760 8761 8762 8763 8764 8765 8766
StandardEvent.prototype.render = function () { var _a = this, props = _a.props, context = _a.context; var seg = props.seg; var timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat; var timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd); return (vdom_cjs.createElement(EventRoot, { seg: seg, timeText: timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (vdom_cjs.createElement("a", tslib.__assign({ className: props.extraClassNames.concat(classNames).join(' '), style: { borderColor: hookProps.borderColor, backgroundColor: hookProps.backgroundColor, }, ref: rootElRef }, getSegAnchorAttrs(seg)), vdom_cjs.createElement("div", { className: "fc-event-main", ref: innerElRef, style: { color: hookProps.textColor } }, innerContent),
0
0
1
+ 4756 other calls in file
727 728 729 730 731 732 733 734 735 736
'fc-v-event', ]; if (this.props.isShort) { classNames.push('fc-timegrid-event-short'); } return (common.createElement(common.StandardEvent, tslib.__assign({}, this.props, { defaultTimeFormat: DEFAULT_TIME_FORMAT, extraClassNames: classNames }))); }; return TimeColEvent; }(common.BaseComponent));
0
0
1
+ 31 other calls in file
40 41 42 43 44 45 46 47 48 49 50
return ListViewHeaderRow; }(common.BaseComponent)); function renderInnerContent(props) { return (common.createElement(common.Fragment, null, props.text && (common.createElement("a", tslib.__assign({ id: props.textId, className: "fc-list-day-text" }, props.navLinkAttrs), props.text)), props.sideText && ( /* not keyboard tabbable */common.createElement("a", tslib.__assign({ "aria-hidden": true, className: "fc-list-day-side-text" }, props.sideNavLinkAttrs), props.sideText)))); } var DEFAULT_TIME_FORMAT = common.createFormatter({ hour: 'numeric',
0
0
1
+ 9 other calls in file
876 877 878 879 880 881 882 883 884 885
(eventResize ? eventResize.affectedInstances : null) || {}; return (common.createElement(common.Fragment, null, sortedFgSegs.map(function (seg) { var instanceId = seg.eventRange.instance.instanceId; return (common.createElement("div", { key: instanceId, style: { visibility: hiddenInstances[instanceId] ? 'hidden' : '' } }, common.createElement(TimeColEvent, tslib.__assign({ seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === eventSelection, isShort: false }, common.getSegMeta(seg, todayRange, nowDate))))); }))); } function computeSegVStyle(segVCoords) { if (!segVCoords) {
0
0
1
+ 31 other calls in file
766 767 768 769 770 771 772 773 774 775
var interactionAffectedInstances = // TODO: messy way to compute this (props.eventDrag && props.eventDrag.affectedInstances) || (props.eventResize && props.eventResize.affectedInstances) || {}; var sortedFgSegs = this.sortEventSegs(props.fgEventSegs, context.options.eventOrder); return (common.createElement(common.DayCellRoot, { elRef: props.elRef, date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function (rootElRef, classNames, dataAttrs) { return (common.createElement("td", tslib.__assign({ ref: rootElRef, role: "gridcell", className: ['fc-timegrid-col'].concat(classNames, props.extraClassNames || []).join(' ') }, dataAttrs, props.extraDataAttrs), common.createElement("div", { className: "fc-timegrid-col-frame" }, common.createElement("div", { className: "fc-timegrid-col-bg" }, _this.renderFillSegs(props.businessHourSegs, 'non-business'), _this.renderFillSegs(props.bgEventSegs, 'bg-event'),
0
0
1
+ 31 other calls in file
39 40 41 42 43 44 45 46 47 48 49
}; return ListViewHeaderRow; }(common.BaseComponent)); function renderInnerContent(props) { return (common.createElement(common.Fragment, null, props.text && (common.createElement("a", tslib.__assign({ id: props.textId, className: "fc-list-day-text" }, props.navLinkAttrs), props.text)), props.sideText && ( /* not keyboard tabbable */common.createElement("a", tslib.__assign({ "aria-hidden": true, className: "fc-list-day-side-text" }, props.sideNavLinkAttrs), props.sideText)))); } var DEFAULT_TIME_FORMAT = common.createFormatter({
0
0
1
+ 9 other calls in file
812 813 814 815 816 817 818 819 820 821
}; if (shouldOverlap && seg.forwardPressure) { // add padding to the edge so that forward stacked events don't cover the resizer's icon props[isRtl ? 'marginLeft' : 'marginRight'] = 10 * 2; // 10 is a guesstimate of the icon's width } return tslib.__assign(tslib.__assign({}, props), this.computeSegTopBottomCss(seg)); }; TimeCol.prototype.computeSegTopBottomCss = function (seg) { return { top: seg.top,
0
0
1
+ 685 other calls in file
757 758 759 760 761 762 763 764 765 766
var instanceId = seg.eventRange.instance.instanceId; var isMirror = isDragging || isResizing || isDateSelecting; var positionCss = isMirror // will span entire column width // also, won't assign z-index, which is good, fc-event-mirror will overpower other harnesses ? tslib.__assign({ left: 0, right: 0 }, _this.computeSegTopBottomCss(seg)) : _this.computeFgSegPositionCss(seg); return (common.createElement("div", { className: 'fc-timegrid-event-harness' + (seg.level > 0 ? ' fc-timegrid-event-harness-inset' : ''), key: instanceId, style: tslib.__assign({ visibility: segIsInvisible[instanceId] ? 'hidden' : '' }, positionCss) }, common.createElement(TimeColEvent, tslib.__assign({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === props.eventSelection, isCondensed: (seg.bottom - seg.top) < common.config.timeGridEventCondensedHeight }, common.getSegMeta(seg, props.todayRange, props.nowDate))))); }); };
0
0
1
+ 923 other calls in file
24 25 26 27 28 29 30 31 32 33
// will ever be falsy? also, BAD NAME "alt" var sideText = options.listDaySideFormat ? dateEnv.format(dayDate, options.listDaySideFormat) : ''; var navLinkData = options.navLinks ? common.buildNavLinkData(dayDate) : null; var hookProps = tslib.__assign({ date: dateEnv.toDate(dayDate), view: viewApi, text: text, sideText: sideText, navLinkData: navLinkData }, dayMeta); var classNames = ['fc-list-day'].concat(common.getDayClassNames(dayMeta, theme)); // TODO: make a reusable HOC for dayHeader (used in daygrid/timegrid too)
0
0
1
+ 4 other calls in file
80 81 82 83 84 85 86 87 88 89 90 91 92
//// [/users/username/projects/project/index.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; var tslib_1 = require("tslib"); exports.x = tslib_1.__assign({}); Change::
0
0
1
tslib.__assign is the most popular function in tslib (16334 examples)