Add semantic token highlighting for 'that' variable and comment file references in VS Code extension Add Phone_Text_Input and Currency_Input components with formatting utilities Implement client widgets, form standardization, and soft delete functionality Add modal scroll lock and update documentation Implement comprehensive modal system with form integration and validation Fix modal component instantiation using jQuery plugin API Implement modal system with responsive sizing, queuing, and validation support Implement form submission with validation, error handling, and loading states Implement country/state selectors with dynamic data loading and Bootstrap styling Revert Rsx::Route() highlighting in Blade/PHP files Target specific PHP scopes for Rsx::Route() highlighting in Blade Expand injection selector for Rsx::Route() highlighting Add custom syntax highlighting for Rsx::Route() and Rsx.Route() calls Update jqhtml packages to v2.2.165 Add bundle path validation for common mistakes (development mode only) Create Ajax_Select_Input widget and Rsx_Reference_Data controller Create Country_Select_Input widget with default country support Initialize Tom Select on Select_Input widgets Add Tom Select bundle for enhanced select dropdowns Implement ISO 3166 geographic data system for country/region selection Implement widget-based form system with disabled state support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
114 lines
3.5 KiB
JavaScript
Executable File
114 lines
3.5 KiB
JavaScript
Executable File
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
const { ConcatSource } = require("webpack-sources");
|
|
const { UsageState } = require("../ExportsInfo");
|
|
const RuntimeGlobals = require("../RuntimeGlobals");
|
|
const propertyAccess = require("../util/propertyAccess");
|
|
const { getEntryRuntime } = require("../util/runtime");
|
|
const AbstractLibraryPlugin = require("./AbstractLibraryPlugin");
|
|
|
|
/** @typedef {import("webpack-sources").Source} Source */
|
|
/** @typedef {import("../../declarations/WebpackOptions").LibraryOptions} LibraryOptions */
|
|
/** @typedef {import("../../declarations/WebpackOptions").LibraryType} LibraryType */
|
|
/** @typedef {import("../../declarations/WebpackOptions").LibraryExport} LibraryExport */
|
|
/** @typedef {import("../Chunk")} Chunk */
|
|
/** @typedef {import("../Module")} Module */
|
|
/** @typedef {import("../Module").RuntimeRequirements} RuntimeRequirements */
|
|
/** @typedef {import("../javascript/JavascriptModulesPlugin").StartupRenderContext} StartupRenderContext */
|
|
/** @template T @typedef {import("./AbstractLibraryPlugin").LibraryContext<T>} LibraryContext<T> */
|
|
|
|
/**
|
|
* @typedef {object} ExportPropertyLibraryPluginParsed
|
|
* @property {LibraryExport=} export
|
|
*/
|
|
|
|
/**
|
|
* @typedef {object} ExportPropertyLibraryPluginOptions
|
|
* @property {LibraryType} type
|
|
*/
|
|
/**
|
|
* @typedef {ExportPropertyLibraryPluginParsed} T
|
|
* @extends {AbstractLibraryPlugin<ExportPropertyLibraryPluginParsed>}
|
|
*/
|
|
class ExportPropertyLibraryPlugin extends AbstractLibraryPlugin {
|
|
/**
|
|
* @param {ExportPropertyLibraryPluginOptions} options options
|
|
*/
|
|
constructor({ type }) {
|
|
super({
|
|
pluginName: "ExportPropertyLibraryPlugin",
|
|
type
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @param {LibraryOptions} library normalized library option
|
|
* @returns {T | false} preprocess as needed by overriding
|
|
*/
|
|
parseOptions(library) {
|
|
return {
|
|
export: library.export
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @param {Module} module the exporting entry module
|
|
* @param {string} entryName the name of the entrypoint
|
|
* @param {LibraryContext<T>} libraryContext context
|
|
* @returns {void}
|
|
*/
|
|
finishEntryModule(
|
|
module,
|
|
entryName,
|
|
{ options, compilation, compilation: { moduleGraph } }
|
|
) {
|
|
const runtime = getEntryRuntime(compilation, entryName);
|
|
if (options.export) {
|
|
const exportsInfo = moduleGraph.getExportInfo(
|
|
module,
|
|
Array.isArray(options.export) ? options.export[0] : options.export
|
|
);
|
|
exportsInfo.setUsed(UsageState.Used, runtime);
|
|
exportsInfo.canMangleUse = false;
|
|
} else {
|
|
const exportsInfo = moduleGraph.getExportsInfo(module);
|
|
exportsInfo.setUsedInUnknownWay(runtime);
|
|
}
|
|
moduleGraph.addExtraReason(module, "used as library export");
|
|
}
|
|
|
|
/**
|
|
* @param {Chunk} chunk the chunk
|
|
* @param {RuntimeRequirements} set runtime requirements
|
|
* @param {LibraryContext<T>} libraryContext context
|
|
* @returns {void}
|
|
*/
|
|
runtimeRequirements(chunk, set, libraryContext) {
|
|
set.add(RuntimeGlobals.exports);
|
|
}
|
|
|
|
/**
|
|
* @param {Source} source source
|
|
* @param {Module} module module
|
|
* @param {StartupRenderContext} renderContext render context
|
|
* @param {LibraryContext<T>} libraryContext context
|
|
* @returns {Source} source with library export
|
|
*/
|
|
renderStartup(source, module, renderContext, { options }) {
|
|
if (!options.export) return source;
|
|
const postfix = `${RuntimeGlobals.exports} = ${
|
|
RuntimeGlobals.exports
|
|
}${propertyAccess(
|
|
Array.isArray(options.export) ? options.export : [options.export]
|
|
)};\n`;
|
|
return new ConcatSource(source, postfix);
|
|
}
|
|
}
|
|
|
|
module.exports = ExportPropertyLibraryPlugin;
|