@servicetitan/dte-unlayer 0.122.0 → 0.123.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/display-conditions/ConditionGroup.d.ts +6 -2
- package/dist/display-conditions/ConditionGroup.d.ts.map +1 -1
- package/dist/display-conditions/ConditionGroup.js +8 -3
- package/dist/display-conditions/ConditionGroup.js.map +1 -1
- package/dist/display-conditions/ConditionGroupsSection.d.ts +6 -2
- package/dist/display-conditions/ConditionGroupsSection.d.ts.map +1 -1
- package/dist/display-conditions/ConditionGroupsSection.js +4 -1
- package/dist/display-conditions/ConditionGroupsSection.js.map +1 -1
- package/dist/display-conditions/ConditionRow.d.ts +6 -2
- package/dist/display-conditions/ConditionRow.d.ts.map +1 -1
- package/dist/display-conditions/ConditionRow.js +240 -110
- package/dist/display-conditions/ConditionRow.js.map +1 -1
- package/dist/display-conditions/DisplayConditionModal.d.ts +3 -0
- package/dist/display-conditions/DisplayConditionModal.d.ts.map +1 -1
- package/dist/display-conditions/DisplayConditionModal.js +97 -7
- package/dist/display-conditions/DisplayConditionModal.js.map +1 -1
- package/dist/display-conditions/nunjucks.d.ts.map +1 -1
- package/dist/display-conditions/nunjucks.js +17 -6
- package/dist/display-conditions/nunjucks.js.map +1 -1
- package/dist/display-conditions/types.d.ts +3 -0
- package/dist/display-conditions/types.d.ts.map +1 -1
- package/dist/display-conditions/types.js.map +1 -1
- package/dist/editor-core-source.d.ts +1 -1
- package/dist/editor-core-source.d.ts.map +1 -1
- package/dist/editor-core-source.js +1 -1
- package/dist/editor-core-source.js.map +1 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +3 -1
- package/dist/editor.js.map +1 -1
- package/dist/shared/forms.d.ts +26 -0
- package/dist/shared/forms.d.ts.map +1 -1
- package/dist/shared/forms.js +75 -1
- package/dist/shared/forms.js.map +1 -1
- package/dist/unlayer-interface.d.ts +2 -0
- package/dist/unlayer-interface.d.ts.map +1 -1
- package/dist/unlayer-interface.js.map +1 -1
- package/package.json +1 -1
- package/src/display-conditions/ConditionGroup.tsx +12 -3
- package/src/display-conditions/ConditionGroupsSection.tsx +11 -1
- package/src/display-conditions/ConditionRow.tsx +229 -86
- package/src/display-conditions/DisplayConditionModal.tsx +106 -4
- package/src/display-conditions/nunjucks.ts +18 -9
- package/src/display-conditions/types.ts +4 -0
- package/src/editor-core-source.ts +1 -1
- package/src/editor.tsx +7 -1
- package/src/shared/forms.ts +85 -0
- package/src/unlayer-interface.tsx +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/display-conditions/types.ts"],"sourcesContent":["/**\n * Display condition types for the modal and Nunjucks generation.\n */\n\nexport type DisplayBehavior = 'show' | 'hide';\n\nexport type LogicalOperator = 'and' | 'or';\n\n/** Operators for string-type fields. */\nexport const STRING_OPERATORS = [\n { label: 'Contains', value: 'contains' },\n { label: 'Does not contain', value: 'does_not_contain' },\n { label: 'Is equal to', value: 'is_equal_to' },\n { label: 'Is not equal to', value: 'is_not_equal_to' },\n { label: 'Starts with', value: 'starts_with' },\n { label: 'Ends with', value: 'ends_with' },\n { label: 'Is empty', value: 'is_empty' },\n { label: 'Is not empty', value: 'is_not_empty' },\n] as const;\n\n/** Operators for number-type fields. */\nexport const NUMBER_OPERATORS = [\n { label: '== (equal to)', value: 'num_eq' },\n { label: '!= (not equal to)', value: 'num_neq' },\n { label: '> (greater than)', value: 'num_gt' },\n { label: '< (less than)', value: 'num_lt' },\n { label: '>= (greater than or equal to)', value: 'num_gte' },\n { label: '<= (less than or equal to)', value: 'num_lte' },\n] as const;\n\n/** All operators combined for type definitions. */\nexport const CONDITION_OPERATORS = [...STRING_OPERATORS, ...NUMBER_OPERATORS] as const;\n\nexport type ConditionOperator =\n | (typeof STRING_OPERATORS)[number]['value']\n | (typeof NUMBER_OPERATORS)[number]['value'];\n\n/** Operators that do not require a value (empty/is not empty) */\nexport const VALUE_LESS_OPERATORS: ConditionOperator[] = ['is_empty', 'is_not_empty'];\n\nexport interface SingleCondition {\n id: string;\n dataPointKey: string;\n /** How this condition connects to the PREVIOUS condition. Absent on the first condition. */\n logicalOperator?: LogicalOperator;\n operator: ConditionOperator;\n value: string;\n}\n\nexport interface ConditionGroup {\n id: string;\n /** How this group connects to the PREVIOUS group. Absent on the first group. */\n logicalOperator?: LogicalOperator;\n conditions: SingleCondition[];\n}\n\nexport interface DisplayConditionState {\n behavior: DisplayBehavior;\n groups: ConditionGroup[];\n}\n\nexport interface DataPointOption {\n fieldType: 'number' | 'string';\n fullKey: string;\n title: string;\n}\n\n/** Unlayer display condition shape passed to done() */\nexport interface UnlayerDisplayCondition {\n type: string;\n label: string;\n description?: string;\n before: string;\n after: string;\n}\n"],"names":["STRING_OPERATORS","label","value","NUMBER_OPERATORS","CONDITION_OPERATORS","VALUE_LESS_OPERATORS"],"mappings":"AAAA;;CAEC,GAMD,sCAAsC,GACtC,OAAO,MAAMA,mBAAmB;IAC5B;QAAEC,OAAO;QAAYC,OAAO;IAAW;IACvC;QAAED,OAAO;QAAoBC,OAAO;IAAmB;IACvD;QAAED,OAAO;QAAeC,OAAO;IAAc;IAC7C;QAAED,OAAO;QAAmBC,OAAO;IAAkB;IACrD;QAAED,OAAO;QAAeC,OAAO;IAAc;IAC7C;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAYC,OAAO;IAAW;IACvC;QAAED,OAAO;QAAgBC,OAAO;IAAe;CAClD,CAAU;AAEX,sCAAsC,GACtC,OAAO,MAAMC,mBAAmB;IAC5B;QAAEF,OAAO;QAAiBC,OAAO;IAAS;IAC1C;QAAED,OAAO;QAAqBC,OAAO;IAAU;IAC/C;QAAED,OAAO;QAAoBC,OAAO;IAAS;IAC7C;QAAED,OAAO;QAAiBC,OAAO;IAAS;IAC1C;QAAED,OAAO;QAAiCC,OAAO;IAAU;IAC3D;QAAED,OAAO;QAA8BC,OAAO;IAAU;CAC3D,CAAU;AAEX,iDAAiD,GACjD,OAAO,MAAME,sBAAsB;OAAIJ;OAAqBG;CAAiB,CAAU;AAMvF,+DAA+D,GAC/D,OAAO,MAAME,uBAA4C;IAAC;IAAY;CAAe,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/display-conditions/types.ts"],"sourcesContent":["/**\n * Display condition types for the modal and Nunjucks generation.\n */\n\nexport type DisplayBehavior = 'show' | 'hide';\n\nexport type LogicalOperator = 'and' | 'or';\n\n/** Operators for string-type fields. */\nexport const STRING_OPERATORS = [\n { label: 'Contains', value: 'contains' },\n { label: 'Does not contain', value: 'does_not_contain' },\n { label: 'Is equal to', value: 'is_equal_to' },\n { label: 'Is not equal to', value: 'is_not_equal_to' },\n { label: 'Starts with', value: 'starts_with' },\n { label: 'Ends with', value: 'ends_with' },\n { label: 'Is empty', value: 'is_empty' },\n { label: 'Is not empty', value: 'is_not_empty' },\n] as const;\n\n/** Operators for number-type fields. */\nexport const NUMBER_OPERATORS = [\n { label: '== (equal to)', value: 'num_eq' },\n { label: '!= (not equal to)', value: 'num_neq' },\n { label: '> (greater than)', value: 'num_gt' },\n { label: '< (less than)', value: 'num_lt' },\n { label: '>= (greater than or equal to)', value: 'num_gte' },\n { label: '<= (less than or equal to)', value: 'num_lte' },\n] as const;\n\n/** All operators combined for type definitions. */\nexport const CONDITION_OPERATORS = [...STRING_OPERATORS, ...NUMBER_OPERATORS] as const;\n\nexport type ConditionOperator =\n | (typeof STRING_OPERATORS)[number]['value']\n | (typeof NUMBER_OPERATORS)[number]['value'];\n\n/** Operators that do not require a value (empty/is not empty) */\nexport const VALUE_LESS_OPERATORS: ConditionOperator[] = ['is_empty', 'is_not_empty'];\n\nexport interface SingleCondition {\n id: string;\n dataPointKey: string;\n /** How this condition connects to the PREVIOUS condition. Absent on the first condition. */\n logicalOperator?: LogicalOperator;\n operator: ConditionOperator;\n value: string;\n}\n\nexport interface ConditionGroup {\n id: string;\n /** How this group connects to the PREVIOUS group. Absent on the first group. */\n logicalOperator?: LogicalOperator;\n conditions: SingleCondition[];\n}\n\nexport interface DisplayConditionState {\n behavior: DisplayBehavior;\n groups: ConditionGroup[];\n}\n\nexport interface DataPointOption {\n fieldType: 'number' | 'string';\n fullKey: string;\n title: string;\n}\n\nexport interface FormFieldOption extends DataPointOption {\n formId: number;\n}\n\n/** Unlayer display condition shape passed to done() */\nexport interface UnlayerDisplayCondition {\n type: string;\n label: string;\n description?: string;\n before: string;\n after: string;\n}\n"],"names":["STRING_OPERATORS","label","value","NUMBER_OPERATORS","CONDITION_OPERATORS","VALUE_LESS_OPERATORS"],"mappings":"AAAA;;CAEC,GAMD,sCAAsC,GACtC,OAAO,MAAMA,mBAAmB;IAC5B;QAAEC,OAAO;QAAYC,OAAO;IAAW;IACvC;QAAED,OAAO;QAAoBC,OAAO;IAAmB;IACvD;QAAED,OAAO;QAAeC,OAAO;IAAc;IAC7C;QAAED,OAAO;QAAmBC,OAAO;IAAkB;IACrD;QAAED,OAAO;QAAeC,OAAO;IAAc;IAC7C;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAYC,OAAO;IAAW;IACvC;QAAED,OAAO;QAAgBC,OAAO;IAAe;CAClD,CAAU;AAEX,sCAAsC,GACtC,OAAO,MAAMC,mBAAmB;IAC5B;QAAEF,OAAO;QAAiBC,OAAO;IAAS;IAC1C;QAAED,OAAO;QAAqBC,OAAO;IAAU;IAC/C;QAAED,OAAO;QAAoBC,OAAO;IAAS;IAC7C;QAAED,OAAO;QAAiBC,OAAO;IAAS;IAC1C;QAAED,OAAO;QAAiCC,OAAO;IAAU;IAC3D;QAAED,OAAO;QAA8BC,OAAO;IAAU;CAC3D,CAAU;AAEX,iDAAiD,GACjD,OAAO,MAAME,sBAAsB;OAAIJ;OAAqBG;CAAiB,CAAU;AAMvF,+DAA+D,GAC/D,OAAO,MAAME,uBAA4C;IAAC;IAAY;CAAe,CAAC"}
|