Unload all the CSS dependencies of a template. This function does not trigger a DOM update. CSS style
elements are only removed if not needed during the next CSS insertion.
@param {aria.templates.TemplateCtxt} tplCtxt template context
1420
function (tplCtxt) {
            this.$assert(169, tplCtxt.$TemplateCtxt);

            var unload = tplCtxt.getCSSDependencies();
            var tplClasspath = tplCtxt.tplClasspath;

            this.unloadClassPathDependencies(tplClasspath, unload);

            this.$raiseEvent({
                name : "dependenciesUnloaded",
                templateClasspath : tplClasspath
            });
        }
301500
function (tplClasspath, cssClasspath) {
            this.$assert(230, tplClasspath && cssClasspath);
            var removeUtil = ariaUtilsArray.remove;

            // There should be someone using this css
            var usage = this.__cssUsage[cssClasspath];
            if (usage && usage.length) {
                removeUtil(usage, tplClasspath);
                removeUtil(this.__pathsLoaded, cssClasspath);

                if (!usage.length) {
                    // No other templates depend on this class
                    delete this.__cssUsage[cssClasspath];
                    delete this.__textLoaded[cssClasspath];
                    // keep the prefix in case the css comes back
                }
            } // else should never be reached
        }
1321194
function View_preloadTemplates(dir) {
            var list, name;
            if (this.isDir(dir)) {
                list = this.readDir(dir);
                while (true) {
                    name = list.shift();
                    if (!name) {
                        break;
                    }
                    this.preloadTemplates(di.normalizePath(dir + '/' + name));
                }

            } else if (this.isFile(dir) && this.suffix.test(dir)) {
                process.nextTick(function compileTemplateAsync() {
                    this.setPreloaded(dir, this.swig.compileFile(dir));
                }.bind(this));
            }
        }
1034960
function (domElt) {
            // work-around for http://crbug.com/240772
            var values = [];
            var parent = domElt;
            while (parent && parent.style) {
                values.push(parent.style.cssText);
                parent.style.overflow = "hidden";
                parent = parent.parentNode;
            }
            domElt.getBoundingClientRect(); // making sure Chrome updates the display
            parent = domElt;
            while (parent && parent.style) {
                parent.style.cssText = values.shift();
                parent = parent.parentNode;
            }
        }
511480
public function invalidateLoadedTemplates(): void
    {
        try {
            $me     = new \ReflectionClass($this);
            $parent = $me;

            while ($parent instanceof \ReflectionClass) {
                $me     = $parent;
                $parent = $me->getParentClass();
            }

            $templates = $me->getProperty('loadedTemplates');
            $templates->setAccessible(true);
            $templates->setValue($this, []);
        } catch (\ReflectionException $e) {
        }
    }
202455
function () {
  'use strict';

  // default options for angularTemplatecache gulp task
  var options = {
    config: {
      compilePatternsOnImport: false,
      dataSource: 'pattern',
      dataFileName: 'pattern.yml',
      htmlTemplateDest: './source/_patterns',
      stylesDest: './source/css/scss',
      scriptsDest: './source/js',
      cssCompiler: 'sass', // sass, less, stylus, none
      templateEngine: 'twig',
      templateEngineOptions: {
        base: 'node_modules/pattern-library/patterns/',
        async: false
      },
      templateDonut: {
        twig: './node_modules/pattern-importer/templates/donut.twig'
      },
      convertCategoryTitles: true
    },
    src: ['./node_modules/pattern-library/patterns/**/pattern.yml'],
    taskName: 'patterns-import', // default task name
    dependencies: [] // gulp tasks which should be run before this task
  };

  return options;
}
1106870
function (container, templateCtxt) {
            var contentSearch = null, i, l;
            for (i = 0, l = container.length; i < l; i++) {
                var description = container[i];
                if (description.templateCtxt == templateCtxt) {
                    return description;
                } else {
                    contentSearch = this._findTemplateDes(description.content, templateCtxt);
                    if (contentSearch) {
                        return contentSearch;
                    }
                }
            }
            return null;
        }
809337
def clear_installed_templates
      install_path = Pathname.new(TEMPLATES_FOLDER)
      FileUtils.rm_rf(Dir.glob(install_path))
    end
1243094
private void removeCssLinks() {
		if (this.isInit) {
			return;
		}
		this.isInit = true;
		// Remove all existing link element
		NodeList<Element> links = this.getHead().getElementsByTagName(LinkElement.TAG);
		int size = links.getLength();
		for (int i = 0; i < size; i++) {
			LinkElement elem = LinkElement.as(links.getItem(0));
			if ("stylesheet".equals(elem.getRel())) {
				elem.removeFromParent();
			}
		}
	}
611837
function(template) {
            var self = this;
            this.template = template || this.template;
            Resources.load(this.options.loader, this.template).then(function(content) {
                self.setContent(content);
                self.trigger("loaded");
            }, function() {
                self.setContent(null);
                self.trigger("error");
            });
            return this;
        }
573080
function (templateCtxt, tplSource) {

            ariaUtilsJson.setValue(this._data, "locked", true);

            if (tplSource) {
                tplSource = this._data.selectedTemplate.tplSrcEdit;
            }

            // do some cleaning
            this.clearHightlight();

            // do not close if target IS the contextual menu
            if (this._mainContextual && templateCtxt.tplClasspath != this._mainContextual.CONTEXTUAL_TEMPLATE_CLASSPATH) {
                this._mainContextual.close();
            }

            // replace in this scope Aria and aria
            var oSelf = this;
            var doIt = function () {
                // var Aria = oSelf.bridge.getAria(), aria = oSelf.bridge.getAriaPackage();

                // ... and call for reload
                templateCtxt.$reload(tplSource, {
                    fn : oSelf._unlock,
                    scope : oSelf
                });
            };
            doIt();

        }
45927
function (force, cssText) {
        if (force !== true) {
            aria.templates.CSSMgr.__textToDOM(ariaUtilsObject.keys(aria.templates.CSSMgr.__styleTagPool));
        } else {
            // Having an empty text to dom go deeper in the CSSMgr to force a reload
            var styleBuilder = {};
            for (var id in aria.templates.CSSMgr.__styleTagPool) {
                if (aria.templates.CSSMgr.__styleTagPool.hasOwnProperty(id)) {
                    styleBuilder[id] = (id === "tpl" && cssText) ? [cssText] : [];
                }
            }
            aria.templates.CSSMgr.__reloadStyleTags(styleBuilder);
        }
    }
528146
function(ctx) {
				var tree = ctx.tree,
					opts = tree.options;

				//this.debug("Fancytree.treeInit()");
				// Add container to the TAB chain
				// See http://www.w3.org/TR/wai-aria-practices/#focus_activedescendant
				// #577: Allow to set tabindex to "0", "-1" and ""
				tree.$container.attr("tabindex", opts.tabindex);

				// Copy some attributes to tree.data
				$.each(TREE_ATTRS, function(i, attr) {
					if (opts[attr] !== undefined) {
						tree.info("Move option " + attr + " to tree");
						tree[attr] = opts[attr];
						delete opts[attr];
					}
				});

				if (opts.rtl) {
					tree.$container
						.attr("DIR", "RTL")
						.addClass("fancytree-rtl");
				} else {
					tree.$container
						.removeAttr("DIR")
						.removeClass("fancytree-rtl");
				}
				if (opts.aria) {
					tree.$container.attr("role", "tree");
					if (opts.selectMode !== 1) {
						tree.$container.attr("aria-multiselectable", true);
					}
				}
				this.treeLoad(ctx);
			}
457734
function(template) {

		// save, cause we can not retrieve container's DOM elements after broadcastRemove
		var start_element = this._getStartElement(template),
			end_element = this._getEndElement(template);

		// first, we must inform the template, that it's going to be removed: to allow it's child views to interact
		// with nodes while they are still in DOM
		template.broadcastRemove();

		if (start_element == end_element) {

			Firestorm.Element.destroy(start_element);

		} else {

			// remove everything between tags and tags themselves
			Firestorm.DOM.clearOuterRange(start_element, end_element);

		}

		Firestorm.Array.exclude(this._current_templates, template);

	}
970512
async function unlink(args: Array<string>, ctx: ConfigT) {
  const packageName = args[0];

  const {[packageName]: dependency, ...otherDependencies} = ctx.dependencies;

  if (!dependency) {
    throw new CLIError(`
      Failed to unlink "${packageName}". It appears that the project is not linked yet.
    `);
  }

  const dependencies = values(otherDependencies);
  try {
    if (dependency.hooks.preulink) {
      await dependency.hooks.preulink();
    }
    unlinkDependency(
      ctx.platforms,
      ctx.project,
      dependency,
      packageName,
      dependencies,
    );
    if (dependency.hooks.postunlink) {
      await dependency.hooks.postunlink();
    }
  } catch (error) {
    throw new CLIError(
      `Something went wrong while unlinking. Reason ${error.message}`,
      error,
    );
  }

  // @todo move all these to above try/catch
  // @todo it is possible we could be unlinking some project assets in case of duplicate
  const assets = difference(
    dependency.assets,
    flatMap(dependencies, d => d.assets),
  );

  if (assets.length === 0) {
    return;
  }

  Object.keys(ctx.platforms || {}).forEach(platform => {
    const projectConfig = ctx.project[platform];
    const linkConfig =
      ctx.platforms[platform] &&
      ctx.platforms[platform].linkConfig &&
      ctx.platforms[platform].linkConfig();
    if (!linkConfig || !linkConfig.unlinkAssets || !projectConfig) {
      return;
    }

    logger.info(`Unlinking assets from ${platform} project`);
    // $FlowFixMe
    linkConfig.unlinkAssets(assets, projectConfig);
  });

  logger.info(
    `${packageName} assets has been successfully unlinked from your project`,
  );
}
1280931
function (cfg, ctxt) {
        this.$BaseWidget.constructor.apply(this, arguments);

        /**
         * Creates a unique id to be used in the markup generated by the widget.
         * @return {String}
         */
        if (!cfg.id) {
            this._domId = this._createDynamicId();
        } else {
            this._domId = this._context.$getId(cfg.id);
        }

        /**
         * Element containing the template content
         * @protected
         * @type HTMLElement
         */
        this._subTplDiv = null;

        /**
         * Template context of the sub template.
         * @type aria.templates.TemplateCtxt
         */
        this.subTplCtxt = null;

        /**
         * Is true if a module controller instance has to be created by the template widget itself.
         * @protected
         * @type Boolean
         */
        this._needCreatingModuleCtrl = cfg.moduleCtrl && cfg.moduleCtrl.getData == null;

        /**
         * Configuration which will be sent to the template context. It is initialized with some properties in the
         * template widget constructor and completed later. It is set to null just after the template context has been
         * initialized, or if an error prevents the template from being loaded. So, if it is not null, we are still
         * waiting for the template to be loaded.
         * @protected
         * @type aria.templates.CfgBeans:InitTemplateCfg
         */
        this._tplcfg = {
            classpath : ariaCoreEnvironmentCustomizations.getTemplateCP(cfg.classpath),
            args : cfg.args,
            id : this._domId,
            moduleCtrl : cfg.moduleCtrl
        };
        // does the normalization
        this._checkCfgConsistency(cfg);

        var tplCtxt = new ariaTemplatesTemplateCtxt();
        this.subTplCtxt = tplCtxt;

        /**
         * Whether the context was already initialized or not.<br />
         * Not-initialized context means the the widget is still waiting for some dependencies to load, thus it's a
         * differed content
         * @type Boolean
         * @protected
         */
        this._initCtxDone = false;

        /**
         * Whether or not the widget is differed in its main section.<br />
         * If the context is not initialized when the markup is created this widget should be considered as differed to
         * avoid triggering $displayReady on the containg template
         * @type Boolean
         * @override
         */
        this.isDiffered = false;

        /**
         * CSS classes coming from the CSS templates associated to the template
         * @protected
         * @type String
         */
        this._cssClassNames = "";
    }
337593
function (evt) {
            var reloading = evt.reloadingObject;
            var tmpCfg = this._getReloadCfg();
            var isUsingModuleData = reloading && (this.moduleCtrl.getData() == tmpCfg.data);
            Aria.disposeTemplate(tmpCfg.div); // dispose the old template
            if (reloading) {
                var oSelf = this;
                reloading.$on({
                    scope : {},
                    "objectLoaded" : function (evt) {
                        tmpCfg.moduleCtrl = evt.object;
                        if (isUsingModuleData) {
                            tmpCfg.data = evt.object.getData();
                        }
                        oSelf._callLoadTemplate(tmpCfg);
                    }
                });
            }
        }