Add comprehensive library expansion with new components and demos
- Add new libraries: ui-accessibility, ui-animations, ui-backgrounds, ui-code-display, ui-data-utils, ui-font-manager, hcl-studio - Add extensive layout components: gallery-grid, infinite-scroll-container, kanban-board, masonry, split-view, sticky-layout - Add comprehensive demo components for all new features - Update project configuration and dependencies - Expand component exports and routing structure - Add UI landing pages planning document 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
73
projects/ui-code-display/node_modules/zone.js/bundles/zone-patch-promise-test.umd.js
generated
vendored
Executable file
73
projects/ui-code-display/node_modules/zone.js/bundles/zone-patch-promise-test.umd.js
generated
vendored
Executable file
@@ -0,0 +1,73 @@
|
||||
'use strict';
|
||||
/**
|
||||
* @license Angular v<unknown>
|
||||
* (c) 2010-2025 Google LLC. https://angular.io/
|
||||
* License: MIT
|
||||
*/
|
||||
(function (factory) {
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
factory();
|
||||
})((function () {
|
||||
'use strict';
|
||||
function patchPromiseTesting(Zone) {
|
||||
/**
|
||||
* Promise for async/fakeAsync zoneSpec test
|
||||
* can support async operation which not supported by zone.js
|
||||
* such as
|
||||
* it ('test jsonp in AsyncZone', async() => {
|
||||
* new Promise(res => {
|
||||
* jsonp(url, (data) => {
|
||||
* // success callback
|
||||
* res(data);
|
||||
* });
|
||||
* }).then((jsonpResult) => {
|
||||
* // get jsonp result.
|
||||
*
|
||||
* // user will expect AsyncZoneSpec wait for
|
||||
* // then, but because jsonp is not zone aware
|
||||
* // AsyncZone will finish before then is called.
|
||||
* });
|
||||
* });
|
||||
*/
|
||||
Zone.__load_patch('promisefortest', function (global, Zone, api) {
|
||||
var symbolState = api.symbol('state');
|
||||
var UNRESOLVED = null;
|
||||
var symbolParentUnresolved = api.symbol('parentUnresolved');
|
||||
// patch Promise.prototype.then to keep an internal
|
||||
// number for tracking unresolved chained promise
|
||||
// we will decrease this number when the parent promise
|
||||
// being resolved/rejected and chained promise was
|
||||
// scheduled as a microTask.
|
||||
// so we can know such kind of chained promise still
|
||||
// not resolved in AsyncTestZone
|
||||
Promise[api.symbol('patchPromiseForTest')] = function patchPromiseForTest() {
|
||||
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
|
||||
if (oriThen) {
|
||||
return;
|
||||
}
|
||||
oriThen = Promise[Zone.__symbol__('ZonePromiseThen')] = Promise.prototype.then;
|
||||
Promise.prototype.then = function () {
|
||||
var chained = oriThen.apply(this, arguments);
|
||||
if (this[symbolState] === UNRESOLVED) {
|
||||
// parent promise is unresolved.
|
||||
var asyncTestZoneSpec = Zone.current.get('AsyncTestZoneSpec');
|
||||
if (asyncTestZoneSpec) {
|
||||
asyncTestZoneSpec.unresolvedChainedPromiseCount++;
|
||||
chained[symbolParentUnresolved] = true;
|
||||
}
|
||||
}
|
||||
return chained;
|
||||
};
|
||||
};
|
||||
Promise[api.symbol('unPatchPromiseForTest')] = function unpatchPromiseForTest() {
|
||||
// restore origin then
|
||||
var oriThen = Promise[Zone.__symbol__('ZonePromiseThen')];
|
||||
if (oriThen) {
|
||||
Promise.prototype.then = oriThen;
|
||||
Promise[Zone.__symbol__('ZonePromiseThen')] = undefined;
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
patchPromiseTesting(Zone);
|
||||
}));
|
||||
Reference in New Issue
Block a user