<commit_before>﻿/// <reference path="../elements.d.ts" />

namespace NodeEditBehaviorNamespace {
	interface NodeEditBehaviorProperties {
		pageContentSelected: boolean;
		linkContentSelected: boolean;
		selectionContentSelected: boolean;
		imageContentSelected: boolean;
		videoContentSelected: boolean;
		audioContentSelected: boolean;
	}

	export const nodeEditBehaviorProperties: NodeEditBehaviorProperties = {
		/**
		* The new settings object, to be written on save
		*/
		newSettings: {
			type: Object,
			notify: true,
			value: {}
		},
		/**
		* Whether the indicator for content type "page" should be selected
		*/
		pageContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "link" should be selected
		*/
		linkContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "selection" should be selected
		*/
		selectionContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "image" should be selected
		*/
		imageContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "video" should be selected
		*/
		videoContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "audio" should be selected
		*/
		audioContentSelected: {
			type: Boolean,
			notify: true
		}
	} as any;

	export class NEB {
		static properties = nodeEditBehaviorProperties;

		static getContentTypeLaunchers(this: NodeEditBehaviorInstance, resultStorage: Partial<CRM.Node>) {
			const arr: [
				keyof typeof nodeEditBehaviorProperties,
				keyof typeof nodeEditBehaviorProperties,
				keyof typeof nodeEditBehaviorProperties,
				keyof typeof nodeEditBehaviorProperties,
				keyof typeof nodeEditBehaviorProperties,
				keyof typeof nodeEditBehaviorProperties
			] = [
				'pageContentSelected',
				'linkContentSelected',
				'selectionContentSelected',
				'imageContentSelected',
				'videoContentSelected',
				'audioContentSelected'
			];
			resultStorage.onContentTypes = arr.map((key) => {
				return this[key] as boolean;
			}) as CRM.ContentTypes;
		};

		static getTriggers(this: NodeEditBehaviorInstance, resultStorage: Partial<CRM.Node>) {
			const inputs = this.shadowRoot.querySelectorAll('.executionTrigger paper-input') as NodeListOf<HTMLPaperInputElement>;<commit_msg>uses a better method for getting checkbox selection status<commit_after>﻿/// <reference path="../elements.d.ts" />

namespace NodeEditBehaviorNamespace {
	interface NodeEditBehaviorProperties {
		pageContentSelected: boolean;
		linkContentSelected: boolean;
		selectionContentSelected: boolean;
		imageContentSelected: boolean;
		videoContentSelected: boolean;
		audioContentSelected: boolean;
	}

	export const nodeEditBehaviorProperties: NodeEditBehaviorProperties = {
		/**
		* The new settings object, to be written on save
		*/
		newSettings: {
			type: Object,
			notify: true,
			value: {}
		},
		/**
		* Whether the indicator for content type "page" should be selected
		*/
		pageContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "link" should be selected
		*/
		linkContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "selection" should be selected
		*/
		selectionContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "image" should be selected
		*/
		imageContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "video" should be selected
		*/
		videoContentSelected: {
			type: Boolean,
			notify: true
		},
		/**
		* Whether the indicator for content type "audio" should be selected
		*/
		audioContentSelected: {
			type: Boolean,
			notify: true
		}
	} as any;

	export class NEB {
		static properties = nodeEditBehaviorProperties;

		static getContentTypeLaunchers(this: NodeEditBehaviorInstance, resultStorage: Partial<CRM.Node>) {
			const containers = this.$.showOnContentIconsContainer.children;
			resultStorage.onContentTypes = Array.prototype.slice.apply(containers).map((item: Element) => {
				return item.querySelector('paper-checkbox').checked;
			});
		};

		static getTriggers(this: NodeEditBehaviorInstance, resultStorage: Partial<CRM.Node>) {
			const inputs = this.shadowRoot.querySelectorAll('.executionTrigger paper-input') as NodeListOf<HTMLPaperInputElement>;
{'fraction_non_alphanumeric': 0.09648929123426805, 'fraction_numerical': 0.0, 'mean_word_length': 3.9616648411829134, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2137047', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1241, 'n_words': 353}