<commit_before>#include '../../$$.jsxinc'

#include '../../etc/$$.ScriptUI.jsxinc'
#include '../../etc/ScriptUI/factories/$$.Popup.jsxinc'
#include '../../etc/ScriptUI/factories/$$.CheckList.jsxinc'

$$.load();

// =============================================================================
// TestCheckList [210814]
// CheckListFactory tester, using a Popup component.
// =============================================================================
try
{
	ScriptUI.builder
	({
		properties:                     { type:'dialog', text:"Test CheckListFactory" },
		margins:                        0,
		spacing:                        0,
		orientation:                    'stack',
		
		Group$0:
		{
			margins:                    20,
			spacing:                    20,
			orientation:                'row',

			Group$0:
			{
				orientation:            'column',
				alignChildren:          ScriptUI.LT,
				margins:                20,
				spacing:                10,

				StaticText$0:           { properties:{text:__("List of products:")} },
				CheckListFactory$MyCheckList:
				[{
					data:              [
					                     "+ Adobe",
					                        "++ Design", "+++ InDesign", "+++ Illustrator", "--- Photoshop", "--- Acrobat",
					                        "-- Video",  "--- Premiere", "--- AfterEffects",
					                        "-- Audio",  "--- Audition",
					                     "+ Indiscripts", "++ IndexMatic", "++ IndyFont", "++ BookBarcode", "++ HurryCover", "++ Wordalizer", "++ Claquos",
					                     "- (Others)", "-- Product1", "-- Product2", "-- Product3", "-- Product4"
					                     ],
					maxLines:           16,
					onValueChange:      function onValueChange()
					{
						var n = this.countNodes();
						var N = this.countNodes('all');
						this.window.Info.text = __("%1/%2 nodes selected.", n, N) + '\r\r' + this.getString(1,'slashed').replace(RegExp.X1,'\r');
					},
					onRightClick:      function onRightClick()
					{
						this.popup( __("Click to check/uncheck items or branches. Use Ctrl A to select all nodes, Ctrl Alt A to deselect all nodes."), 2, 4 );
					},
				}],
			},

			Group$1:
			{
				orientation:            'column',
				alignment:              ScriptUI.LF,<commit_msg>TestCheckList - Upd CheckList factory demo [211207]<commit_after>#include '../../$$.jsxinc'

#include '../../etc/$$.ScriptUI.jsxinc'
#include '../../etc/ScriptUI/factories/$$.Popup.jsxinc'
#include '../../etc/ScriptUI/factories/$$.CheckList.jsxinc'

$$.load();

// =============================================================================
// TestCheckList [210814] [211207]
// CheckListFactory tester, using a Popup component.
// [CHG211207] The 'InDesign' item is made LOCKED using `###` prefix
// =============================================================================
try
{
	ScriptUI.builder
	({
		properties:                     { type:'dialog', text:"Test CheckListFactory" },
		margins:                        0,
		spacing:                        0,
		orientation:                    'stack',
		
		Group$0:
		{
			margins:                    20,
			spacing:                    20,
			orientation:                'row',

			Group$0:
			{
				orientation:            'column',
				alignChildren:          ScriptUI.LT,
				margins:                20,
				spacing:                10,

				StaticText$0:           { properties:{text:__("List of products:")} },
				CheckListFactory$MyCheckList:
				[{
					data:              [
					                     "+ Adobe",
					                        "++ Design", "### InDesign", "+++ Illustrator", "--- Photoshop", "--- Acrobat",
					                        "-- Video",  "--- Premiere", "--- AfterEffects",
					                        "-- Audio",  "--- Audition",
					                     "+ Indiscripts", "++ IndexMatic", "++ IndyFont", "++ BookBarcode", "++ HurryCover", "++ Wordalizer", "++ Claquos",
					                     "- (Others)", "-- Product1", "-- Product2", "-- Product3", "-- Product4"
					                     ],
					maxLines:           16,
					onValueChange:      function onValueChange()
					{
						var n = this.countNodes();
						var N = this.countNodes('all');
						this.window.Info.text = __("%1/%2 nodes selected.", n, N) + '\r\r' + this.getString(1,'slashed').replace(RegExp.X1,'\r');
					},
					onRightClick:      function onRightClick()
					{
						this.popup( __("Click to check/uncheck items or branches. Use Ctrl A to select all nodes, Ctrl Alt A to deselect all nodes."), 2, 4 );
					},
				}],
			},

			Group$1:
			{
				orientation:            'column',
				alignment:              ScriptUI.LF,
{'fraction_non_alphanumeric': 0.22274476271911073, 'fraction_numerical': 0.017528858486532708, 'mean_word_length': 1.6524943310657596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '232572', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1252, 'n_words': 262}